I just started reading "Head First Java" and am on the GuessGame program shown below. When I try to compile it using the JDK I get an error for each class. "class GuessGame is public, should be declared a file named GuessGame.java", "class Player is public, should be declared in a file named Player.java", and "Class names, 'GameLauncher', are only accepted if annotation processing is explicitly requested". I have no idea what the 3rd error means but do the first two mean that I need to individually save each class as its own file? Or make the ones that aren't the one with the main() not public? I'm confused about what the file should be named before compiling it. Right now it's named GameLauncher.java because I thought that the name of the file had to be the same as the class with the main in it or something. This was because previously code wouldn't compile unless it was blank.java with the blank being the name of the main class. What exactly determines what the file should be named before compiling? Since everything in
java has to be in a class, which class does the compiler look at first? I assume the code below is correct because it is the same that is presented in the book? Help would be greatly appreciated
.