Whyyy static is present in main method of java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answer
+ 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