I have noticed that if don\'t write public before a class its works same as like a public class. I can\'t understand why so? It should show a error
public
public class
There must be only one public class per .java source file and the name of the file must match with this public class.
Similar question is asked before on SO. Please find it here