What does public static void main mean?
This is the entry address of the java program. When the java virtual machine runs the program, the first thing it looks for is main. Method. The function is the same as the main() function in C language. Only java programs with main() method can be executed by the java virtual machine, which can be understood as the prescribed format
For the inside Parameters and modifiers
public: Indicates the access rights of this program, indicating that it can be referenced on any occasion, so that the Java virtual machine can find the main() method to run the javac program
static: Indicates that the method is static, does not depend on the object of the class, and belongs to the class. When the class is loaded, the main() method is also loaded into the memory.
void:main The () method does not require a return value
main: Convention, specified
String[] args: Receive parameters from the console
Recommended tutorial: " java tutorial》
The above is the detailed content of What does public static void main mean?. For more information, please follow other related articles on the PHP Chinese website!