Rubens Martins wrote:As I said before, I am not supposed to save three different files.
One of the rules of Java is that if you make a top-level class public, it has to be saved in a file with the same name as the class (and the .java extension). You have two public classes: SimpleDotCom and GameHelper. These need to be in two separate files named SimpleDotCom.java and GameHelper.java.
You can also make the classes not public, as Hunter suggests.
Hunter McMillen wrote:Your import statements need to be the first line in the saved file. So instead of having the import in the middle, move it to the top.
It doesn't need to be the first line, but the only things that are allowed to be placed before import statements are the (optional) package declaration, comments and whitespace. Classes definitely do not fall into that group