46.4k views
3 votes
All java classes must contain a main method which is the first method executed when the java class is called upon.

1 Answer

4 votes
This is false. Not all java classes need a main method. You can create you own class below the class with the main method and put your own user-created methods into it. Classes without a main method can be in its own separate class even.
User Vilas
by
6.7k points