Class modifier:
Public (access control character), declare a class as a common class, he can be accessed by any object, the main class of a program must be a public class
Abstract, declaring a class as an abstract class, without implementing a method, requires a subclass to provide a method implementation
Final, declaring a class as final (that is, non-inheriting), indicating that he cannot be inherited by another class
Member Variable modifiers:
Public access control, which specifies that the variable is public and that he can be accessed by any method of the object
Private access control, which specifies that the variable allows access only to methods of its own class, and that methods in any other class (including subclasses) are inaccessible
Protected (Protected access control) specifies that the variable can be accessed by its own classes and subclasses. This variable can be overridden in a subclass
Final final modifier, specifying that the value of this variable cannot be changed
Static modifier Specifies that the variable is shared by all objects, that is, all instances can use the variable. Variables belong to this class
volatile (volatile modifier) specifies that the variable can be controlled and modified by several threads at the same time
Method Modifiers:
Public (common control character)
Private (proprietary control) specifies that this method can only be accessed by methods such as its own class, which cannot be accessed by other classes (including subclasses)
Protected (Protected access control) specifies that the method can be accessed by its classes and subclasses
Final, specifies that the method cannot be overloaded
Static, specifying a method that can be activated without instantiation
Synchronize, synchronous modifier, which is used in multiple threads to lock the method to which he belongs before running, to prevent access to other threads, and to unlock after the run is finished
Native, local modifier. The method body that specifies this method is written outside of the program in another language
Modifiers for Java