aspose file tools*
The moose likes Beginning Java and the fly likes why more than one public class not allowed in a source file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why more than one public class not allowed in a source file?" Watch "why more than one public class not allowed in a source file?" New topic
Author

why more than one public class not allowed in a source file?

Sushant Sahoo
Greenhorn

Joined: Jan 15, 2009
Posts: 1
why in java more than one public classes are not allowed?
There should be some reason and I hope somebody will explain me.
Thanks in advance.

sushant
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

I asked Mr. Google Why only one public class in a Java file and he was able to point me a fine article that explains that doing such was a design decision to make the compiler more efficient.
 
Don't get me started about those stupid light bulbs.
 
subject: why more than one public class not allowed in a source file?