+ 1
What is static
4 Respostas
+ 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 .
+ 1
Anyting declared Static means that it belongs to the class rather then the the instance
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.