Hi all,
This is another beginner question. I was wondering, is it good practice to put many classes in one single file? Sometimes I notice there are many classes inside one big file and sometimes each class is in its own separate file. Is there an advantage in separating each class in each different file? For e.g. one big file, called A.java:
class A {
public static void main(String[] args) { }
}
class B {}
class C {}
class D {}
Is it better to have class B in a B.java file, and class C in C.java, etc? In the real-world workplace, what is the usual practice?
Thank you for your replies.
P/S : I love Java, it's so cool. :-)