Here's another rule I didn't mention but that should be somewhere in that book you're reading. (You should read more carefully, thoroughly, or both.)
- In order for a Java file to compile to executable code, the Java file that contains the top-level public class with the main() method has to have the same name as the top-level public class with the extension ".java." For example, if the top-level public class that contains the main() method is named "Name," then the file that contains the class must be named "Name.java" in order to be executable once compiled.