what is the significance of keyword public in public static void main
Answers
Answered by
3
Answer:
public: It is an access specifier. We should use a public keyword before the main() method so that JVM can identify the execution point of the program. If we use private, protected, and default before the main() method, it will not be visible to JVM. static: You can make a method static by using the keyword static.
Answered by
1
Answer:
Every word in the public static void main statement has got a meaning to the JVM. Public: It is an Access modifier, which specifies from where and who can access the method. Making the main() method public makes it globally available.
Explanation:
I hope this is useful for you
Similar questions