BottleSong bs = new BottleSong(19); //<<<<<<<<< small number for testing
There could be an error in your logic. The option will show it.
Type: Posts; User: Norm
BottleSong bs = new BottleSong(19); //<<<<<<<<< small number for testing
There could be an error in your logic. The option will show it.
For testing change the number of bottles to 19 and see what is output.
You need to add the -Xlint option for the compiler to see the possible error.
Yes, the formatting is better, but there are Way too many empty lines!!!
Can you explain what is wrong with the program's output. You've posted two outputs but didn't explain what was wrong with...
Edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting
Let us know when you have wrapped your code in code tags.
Did you skip the first couple of chapters of your textbook?
Creating an instance and calling a method are very basic concepts.
Here is a tutorial that you should read:
Trail: Learning the Java...
That shows that your program is running.
Now if you want it to execute other parts of the program you will have to add code to do that.
One way is to create an instance of the class that the...
Which don't you know?
add a line of code first thing in the main() method
printing a message?
Your code has several statements that print output using println. For example:
...
What isn't running? Add a call to println to print out a message the first thing in the main() method. If it prints then you will know that the program is running.
No, there is no indentation. All the lines start in column 1. Nested code should be indented.
Please use code tags.
Where did you get this statement from?
...
Are you having problems doing this?
Can you change the tags around your code from quote to code to make your code readable?
Your code is not readable the way it is posted.
Can you change the tags around your code from quote to code to make your code readable?
Please use code tags, not quote tags.
Where is the error message text? Can you compile the source with javac and post the error messages from the compiler?