K. Tsang wrote:Your problem is the file name does not match the class name. You use Employee (yet not public) but your file name is PayrollPartTwo? The compiler expects a class called PayrollPartTwo.
No it doesn't. A non-public class can be in a file with any name and a .java file does not have to contain a class that matches its name.
The only rule for class and file names is that a public class has to be in a file with a matching name.