hello,
I am currently learning java programming and stuck on one of the tutorials in this book.
the code:
public class beersong{
public static void main (String[] args) {
int beerNum= 99;
string word ="bottles";
while (beerNum >0 ) {
word= "bottle";
}
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 > 0) {
system.out.println (beerNum+""+ word + " of beer on the wall");
}else{
system.out.println("no more bottles of beer on the wall");
}
}
}
}
when compiled I get thease problems:
C:\Documents and Settings\Chris\app\beersong\beersong.java:20: 'class' or 'interface' expected
}
^
C:\Documents and Settings\Chris\app\beersong\beersong.java:20: 'class' or 'interface' expected
}
^
2 errors