Han Mengfei sha Han Yafei [email protected] yue31313 Han_meng_fei_sha
Static and abstract cannot be used at the same time
The static declaration method indicates that this method can be called directly by the class when it does not generate an instance of the class, and the abstract method cannot be called before it can be used by the subclass overriding.
Native can be used with all other Java identifiers, except for abstract.
Because native implies that these methods are implemented, only those implementations are non-Java, but abstract clearly indicates that these methods are not implemented.
Native: Used to declare a local method, the implementation of which is implemented by a non-Java language
Synchronized: The method used to prevent multiple threads from invoking an object at the same time, and static, which prevents multiple threads from invoking a class at the same time.
The function of synchronized can also be seen, the premise of using synchronized is that the method can be called directly
Can the Java abstract method be modified with static statics, or native?