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.
Originally posted by Abhi vijay: It is said that a java source file can have many top level classes, but only 1 top level class can be made public, Why so?
One wierd example but it should make the concept clear :
It like that you have ony one father and mother , so there can be only top level class from which you can inherit most of the properties,also father can have a parent class Grandfather hence if you go up the hierarchy you will find only one class. similarily you will have one parent class from which you can derive most of the properties..