Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Do private variables and static member variables mean the same thing in java? What is the difference?
Do private variables and static member variables mean the same thing in java? What is the difference?
Private variables are decorated with private.

Static member variables are decorated with static.

Private variables can only be called by this class, not by other classes (including subclasses).

Static member variables can also be private or public. To call a static member variable, simply add "."to the class name.

In fact, private is a modified * * * scope and static is a modified variable type.