Why we need static keyword | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Why we need static keyword

29th Apr 2019, 2:12 AM
K. Tejaswini
K. Tejaswini - avatar
2 Réponses
+ 4
So such variables/methods only have one copy of them rather than multiple copies in each of the instances.
29th Apr 2019, 7:04 AM
Sonic
Sonic - avatar
+ 1
It tells compiler that variable/ method marked with this word is on a class level not on instance.
29th Apr 2019, 5:33 AM
Dima Makieiev
Dima Makieiev - avatar