static keyword (java)

The methods or variables modified by the static keyword can be accessed directly through the class name;

Variables modified by the static keyword have only one copy in memory and are only initialized when the class is loaded;

The static keyword is not allowed to modify local variables;

You can access static member variables through this.

Guess you like

Origin blog.csdn.net/qq_36428821/article/details/112495452