0
What is the use of static?
3 Answers
+ 4
"static" says the function work on its own
+ 3
static methods and variables are tied to the class, not the object.
There are also static classes which means no instantiation is necessary. (no new objects).
The obvious example of a static method is the main method. It wouldn't make sense to be able to create a new "main" object.
+ 3
static keyword indicates either it is a class method, class variable.
Remember class cannot be static and final.