https://jnnctechnologies.com/
Java program's main method has to be declared static because keyword static allows main to be called without creating an object of the class in which the main method is defined. ... In this case, main must be declared as public , since it must be called by code outside of its class when the program is started.
Java program's main method has to be declared static because keyword static allows main to be called without creating an object of the class in which the main method is defined. ... In this case, main must be declared as public , since it must be called by code outside of its class when the program is started.
0 Comments
If you have any doubts,please let me know