The file name must be the public class or interface name. A Java source file may contain any number of class declarations and interface declarations but only one can be public. This organization leads to a proliferation of source files in a Java package. Also, the work-arounds for many of the Java traps described in this article require the creation of additional classes and interfaces producing even more source files. A large number of source files causes organizational and comprehension problems.
Larger applications can reduce the problem by breaking packages up into smaller subsystems.
Names for public classes should be descriptive and preferably multi-word. By Reference Parameters Normally, the only way a method can pass back a result is as a return value. Java passes parameters by value to methods. It does not provide by reference or by address parameters, as do other languages. You can't use method parameters directly for retrieving results.