Object - Static

> Code - (Programming|Computer) Language > Language - Object

1 - About

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

Advertising

3 - Documentation / Reference