0
What is the meaning of static in public static void main?
As i read static means that it stores that thing in one memory location only but i coudn't understand the reason behind using it in main function. I read so many answers online but seriously saying i coudn't understand anything somewhere it is written something other place something else. can someone please guide me.
3 Réponses
+ 6
No object needed to call that method
+ 3
Static, defines the method as static, what means that you don't need to instantiate the class for call the method
0
if you declared as static you don't need to create an object to method.so here we are not creating an object to main method that's why we are using static..