What is static | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

What is static

11th Oct 2019, 7:01 PM
Muthu Kumar
Muthu Kumar - avatar
4 Respuestas
+ 10
Static is a keyword that can be applied to class method and variable if we declare method or variable as static we don't need to create object we can access it with class name .
13th Oct 2019, 2:06 PM
Ayushi Gujarati
Ayushi Gujarati - avatar
11th Oct 2019, 7:04 PM
Chetali Shah
Chetali Shah - avatar
+ 1
Anyting declared Static means that it belongs to the class rather then the the instance
11th Oct 2019, 8:56 PM
D_Stark
D_Stark - avatar
0
In programming world, static attribute (or method) means class attribute (or method), that won't be shared with class objects. We use static keyword to keep class attributes to not to be prepared to get shared with objects when the attributes aren't supposed to be shared with objects and we'll save resources.
11th Oct 2019, 7:51 PM
Seb TheS
Seb TheS - avatar