Why main() in java is declared as public static void main? What if the main method is declared as private?
Public – main method is called by JVM to run the method which is outside the scope of project therefore the access specifier has to be public to permit call from anywhere outside the application static – When the JVM makes are call to the main method there is not object existing for the class … Read more