Can the Java abstract method be modified with static statics, or native?

Source: Internet
Author: User

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?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.