+ 1
Why only one 'public class' for per source file?
5 ответов
+ 9
You can use a public class inside another:
public class One {
public class Two{
}
}
Anywho, having a single public class makes it easy for the compiler to find in the package. So as rule, there can only be one public outer class per file. I personally just have each class in its own file anyway.
http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.6
+ 6
@Martin Taylor Nice investigation/finding about code playground.
+ 2
because it is easier to find stuff if you look at the project in your ide