What is the use of static if it is meant to run the program without any instances ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the use of static if it is meant to run the program without any instances ?

25th Oct 2018, 12:26 PM
Tony Tomey Jose
Tony Tomey Jose - avatar
2 Answers
+ 6
This way you can use classes as simple namespaces to keep your functions in them than spam your scope. There are many other uses too...
25th Oct 2018, 12:31 PM
Valen.H. ~
Valen.H. ~ - avatar
0
ok thankyou
25th Oct 2018, 2:17 PM
Tony Tomey Jose
Tony Tomey Jose - avatar