Public Class XXX Should Be in File
The “public class XXX should be in file” message occurs when the class XXX and the Java program filename do not match. The code will only be compiled when the class and Java file are the same. (@coderanch):
To fix this issue:
- Name the class and file the same.
- Make sure the case of both names is consistent.
0 Comments
Post a Comment