I have a file Test.java and the following code inside it.
Test.java
public class Abcd { //some code here }
Now the class does n
The Java specification states you can only have at most one public class per file. In this case, the class name should match the file name. All non-public classes are allowed to have any name, regardless of the file name.