Object - Static


static means shared across all the instances of the Class (object).

The following class structure may be static:

It means that their memory allocation lifetime is the entire run of the process.

Static method or variable are associated with a class, not an object.

Static tells the compiler that there is exactly one copy in existence, regardless of how many times the class has been instantiated as an object.

Avoid saving state in static field. AvoidStaticState

Documentation / Reference

Powered by ComboStrap