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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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: 11231
    
  16

because it makes implementing the JVM easier.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: only 1 public class per source file