File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
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
I agree. Here's the link:
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