What does the ‘static’ keyword mean? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

What does the ‘static’ keyword mean?

24th Aug 2016, 5:32 PM
Agha Asad Khan
Agha Asad Khan - avatar
6 Respuestas
+ 2
In short it means we can use a certain method without defining it, for more explaination you may like to visist tutorialspoint.
24th Aug 2016, 5:46 PM
Ousmane Diaw
+ 1
yes,static means that the method does not belong to any particular instance but to the whole class
24th Aug 2016, 5:51 PM
shivanidalmia
shivanidalmia - avatar
+ 1
static keyword means that , that method doesn't belong to the class and that method doesn't need to be called , which means you do not have to create object for such methods
25th Aug 2016, 12:57 AM
Ayushi Dangayach
Ayushi Dangayach - avatar
+ 1
Static is also used as a keyword for variables to prevent their value from changing during runtime. Additionally, static can describe a block of code to be executed once on load.
25th Aug 2016, 1:30 AM
Benjamin Sullivan
Benjamin Sullivan - avatar
+ 1
static keyword is used to allow variables and functions to call before any object created for the class
25th Aug 2016, 4:03 AM
Amit Yadav
Amit Yadav - avatar
+ 1
static keywords used then don't create objects only create object reference
25th Aug 2016, 8:01 PM
sathya