This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Thank you for posting the whole message, which tells you exactly what is wrong. The problme is not that BeerSong is public, the problem is that it isn't in a file called BeerSong.java. Yo can't have more than one public class per file, and the name of the file and the name of the public class have to be the same. Move the BeerSong class into its own file.
And don't worry about the compiler not compiling BeerSong; when it finds a declaration of a BeerSong class in your code, it will go and look for the BeerSong.java file.
Joined: Jun 18, 2006
ohh ok I see... its because I didnt name the file BeerSong.java. I just named it beer.java. I get it. thanks for the quick reply. I am really new to programing. I have learned a little bit of C++ but not much. I am taking a java class this summer at the local CC and this book looks like it is going to help a lot. I just finished chapter 1 and seem to be getting it so far.
Joined: Oct 13, 2005
Only too happy to be able to help. [ June 18, 2006: Message edited by: Campbell Ritchie ]