+ 1
Why the keyword static is used in main function?
2 Respuestas
+ 2
When the JVM starts your program it accesses main() statically ie. YourProgram.main() without instantiating your main class.
+ 1
The static keyword is used so that the JRE (Java Runtime Environment ) can start executing your program without creating a Object i. e. without creating the instance of the class.