0
why is static keyword used to describe main method??that is public STATIC void main()..
3 Réponses
+ 2
when a method is declared static it means that it can be acessed before any creation of class object
Main() method is the starting point of execution of program hence it must be easily accessible before any object creation
+ 1
static keyword makes main method to static method. That mean main doesn't need to instantiate or create object when it is used
+ 1
jvm calls this method without creating obj
static bcoz no need to create obj
void bcoz no need to return anything to jvm