Main class of Java program
(Recommended tutorial: java introductory tutorial)
There can be multiple classes in one program classes, but only one class can be the main class. In a Java application, this main class refers to the class that contains the main() method.
Related introduction:
What is the difference between the main class of application and applet?
(Video tutorial recommendation: java video tutorial)
In the Java applet, this main class is a subclass inherited from the system class JApplet or Applet. The main class of the application does not necessarily need to be a public class, but the main class of the mini program must be a public class. The main class is the entry point for Java program execution.
The above is the detailed content of What is the main class of a Java program?. For more information, please follow other related articles on the PHP Chinese website!