+ 3

Why we use static in main function?

9th Mar 2017, 1:47 PM
ram pavan
ram pavan - avatar
2 Réponses
+ 1
Because it is not dependant of the instance of the object in which the main function is defined
9th Mar 2017, 2:03 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
Otherwise you'd need an instance fit the method. But there are no instances in the beginning
9th Mar 2017, 10:12 PM
1of3
1of3 - avatar