I've been doing this for almost 6 hours and i can't figure out what is in my codes. please if there is someone out there can tell me what is the problem here.
public class thirdAct
{
public static void main (String write[])
{
int beerNum = 99;
String word = "bottles";
while ( beerNum > 0 )
{
if ( beerNum == 99 ) {
System.out.println(beerNum + " " + word + " of beer on the wall.");
System.out.println(beerNum + " " + word + " of beer.");
}
System.out.println(beerNum + " " + word + " of beer on the wall.");
System.out.println(beerNum + " " + word + " of beer.");
System.out.println("Take one down.");
System.out.println( "Pass it around.");
beerNum = beerNum - 1;
if ( beerNum == 1 ) {
word = "bottle";
} else if ( beerNum == 0 ) {
System.out.println("No more bottle of beer on the wall.");
}
}
}
}
Thank you in advance.
Godbless.