This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.