Java modifier summary

xiaoxiao2021-03-06  100

Class modifier PUBLIC can access OBSTRACT from other classes This class cannot be instantified Final Unable to declare subclasses

The constructor modifier PUBLIC can access protected from all classes that can only access private from its own classes and its subclass.

Domain modifier PUBLIC can access protected from all classes You can only access private from this class and its subclass. You can only access it from this class. Static has only one domain value. There is only one domain value. Transient is not one. One of the Volatile of the Object-lasting state can be modified by the asynchronous thread that final must give the initial value and cannot modify it.

Local variable modifier Final must give it the initial value and cannot modify it

Method modifier PUBLIC can access it from all classes Protected only from this class and its subcatencies that private can only access it from this classes to Abstract No method, belonging to an abstract class Final class category cannot overwrite Static Instances that are bound to the class itself instead of the class Native Native This method is implemented by other programming languages ​​asnchronized before calling it before calling it.

转载请注明原文地址:https://www.9cbs.com/read-124575.html

New Post(0)