168k views
5 votes
All java applications must have a method ________.

1 Answer

4 votes
All java applications must have a method public static void main(String[] args).
where public is the access specifier which allows the main method to be accessble everywhere.
statis helps main method to get loaded without getting allied by any instance/object.
void clarifies that the main method will not return any value.
main is the name of the method.
String[] args- defines the String array to pass arguments at command line. args is the variable name of the String array.


User Chadneal
by
6.7k points