aspose file tools
The moose likes Beginning Java and the fly likes only 1 public class per source file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "only 1 public class per source file" Watch "only 1 public class per source file" New topic
Author

only 1 public class per source file

shivam aggarwal
Greenhorn

Joined: Oct 15, 2009
Posts: 8
we can have only 1 public class per source file and that source file must be named (name of public class.java).why?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 9939
    
    6

because it makes implementing the JVM easier.


Never ascribe to malice that which can be adequately explained by stupidity.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: only 1 public class per source file
 
Similar Threads
Class using Main without declaring itself Public
source file?
Public class
Why should there be only one public class per source file
Abstract class