0
why is it public
why should be public static void instead of private static void ?
2 Respostas
+ 1
main method is public because execution of program start with main and that is performed by JVM that is outside of your code so make the main method available to JVM we write main method public rather than private or protected I hope it will work for you
0
private methods can't be accessed from another class, and Java is OOP (many classes...)
Most of methods are public so we can use it when we work with objects of those classes. U will have privte methods later but they are mostly helper methods for some stuff inside class, for now just go with public...