26.2 modifiers and usage scenarios

 

/ *
* Public public
* default default
* protected Protected (subclass can access different packages). (Modified members can not modify the class)
* Private private access only in the current class. (Not modified class, after modification can not be accessed; is a member of the modification)
* abstract abstract: a modified method can not have a method body
* static Static: You can directly use the class name to call, as the class is loaded and loaded, the object takes precedence over
* final: modified variables are constant, once the initialization can not be changed; modified class can not be inherited; modified method can not be re-
* * /

 

 

Guess you like

Origin www.cnblogs.com/longesang/p/11242608.html