99 Beer on The Wall

Language

The classic 99 beer on the wall.A java console app that help's people to understand the java programming language. The application uses classes,methods and object references.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byThe Code (not verified)on Fri, 01/16/2015 - 16:55

Hey there, Great code for beginners to try to understand java ( like myself). Even though im a beginner and barely understand Java, i wonder if it was intended, if i start the code it will only run once. so it went from 99 to 98 only. If it was intended then ignore this. if not then i might add that u forgot to put the big part of the code that has to decrease the amount of bottles into a while loop. while(beerNum >0){ System.out.println("Take one down."); System.out.println("Pass it around."); beerNum = beerNum- 1; if(beerNum >=0){ System.out.println(beerNum +" " + word + " of beer on the wall"); }else{ System.out.println("No more bottles of beer on the wall "); } like this it will arrive at 0 otherwise it just runs once and thats it. (as nothing in the programm tells it to redo the process until its at 0) but nevertheless, good exercise for people starting out with java and just learned to do if and while loops =)

Add new comment