






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







99 bottles of beer on the wall, 99 bottles of beer! Take one down, pass it around, 98 bottles of beer on the wall! 98 bottles of beer on the wall, 98 bottles of beer! Take one down, pass it around, 97 bottles of beer on the wall! 97 bottles of beer on the wall, 97 bottles of beer! Take one down, pass it around, 96 bottles of beer on the wall! ... (for loop?)
break will exit the current loop (See: Break.java) doSkip true
System.exit(0) will completely stop your program (See: Exit.java)
(See: CountingSheep.java)
When your program is not working, it is often helpful to add println commands to find out what is going on Normally displaying the value of your variables will help you solve the issue (See: ReverseString.java)
The assert command can also be helpful when debugging This can ensure certain boolean expressions are indeed true. (See: Assert.java) (Note: need to add -enableassertions )