+ 1
Why do we use static keyword in the line public static void main(string args[])
3 Réponses
+ 1
static keyword specifies that the class member( variable or method ) is unique. It has a single copy which is shared by all objects of the class. e g : main is unique method
0
Because it is static function.Program calls main Method with ClassName.main(args[]);
0
methods mentioned with static keyword van be called directly with Class name. mentioning static to main method helps JVM to start execution of program.