+ 1
Why we use static keyword in main class of the java program
public - >static<- void main (String arg [])
3 Respuestas
+ 4
static means the method is related to class not object so whenever you run the java program it will call the main method without creating an object of your class
+ 3
Haider Ali Waris
As main method is entry point of every program so it should be call without an object. So if you use static keyword then no need to create an object.
+ 2
Pls use search bar... you can find many answers for similar question...
https://www.sololearn.com/Discuss/549086/?ref=app
https://www.sololearn.com/Discuss/1139681/?ref=app
https://www.sololearn.com/Discuss/32155/?ref=app