A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
only 1 public class per source file
Joined: Oct 15, 2009
Oct 15, 2009 08:35:23
we can have only 1 public class per source file and that source file must be named (name of public class.java).why?
Joined: Oct 02, 2003
Oct 15, 2009 08:43:41
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
Have you tried LearnNowOnline?
subject: only 1 public class per source file
Why should there be only one public class per source file
Class using Main without declaring itself Public
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015