A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. 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