The static modifier means a field or method belongs to the class as a whole rather than to a specific object. Static members exist as a single copy — regardless of how many instances of the class have been created.
Static Fields
The static modifier means a field or method belongs to the class as a whole rather than to a specific object. Static members exist as a single copy — regardless of how many instances of the class have been created.