• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

only 1 public class per source file

 
shivam aggarwal
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 12100
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because it makes implementing the JVM easier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic