Java static properties

static representation is静态的

Features are: can directly access the category .

  • It belongs to the class,
  • There when the class is loaded
  • Therefore, static methods can not access members
  • But members can access static

All objects can be shared.

Therefore often used as tools , such as Math.PI, Arrays.tostring (), etc.

Guess you like

Origin www.cnblogs.com/heenhui2016/p/10960816.html