This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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..