This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Can we use more than one public class in a java file
Answer to this question is No. We can not have more than one public classes inside one source file. And also your source file name should match exactly with public class inside your file. On other side you can have any number of default access classes inside same source file.
we can't try protected as non-nested class
protected is not allowed as access modifier for non inner classes, only public and default are allowed.