Whyyy static is present in main method of java | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Whyyy static is present in main method of java

plz give me answer

25th May 2018, 2:26 PM
Dibyajyoti Pradhan
Dibyajyoti Pradhan - avatar
1 Réponse
+ 2
static means you do not need an instance to use that function. If main method is not static, then you have to create a new instance of that class and then use main method.
25th May 2018, 4:47 PM
Vikash Pal
Vikash Pal - avatar