Java Native Keywords

Source: Internet
Author: User

Native keyword usage

Native is used in conjunction with C + + development! Java self-development is not necessary!

Using the native keyword means that this method is a native function, that is, the method is implemented in C/s + + language and is compiled into a DLL, which is called by Java. The implementation of these functions in the DLL, the JDK source code is not included, you should be invisible. They are also different for different platforms. This is also the underlying mechanism of Java, in fact, Java is on different platforms with different native methods to achieve access to the operating system.

1. Native is implemented in Java and other languages (such as C + +), which is the implementation of the function after native is not written in Java 2. Since it is not Java, then forget its source code, hehe

Native means to inform the operating system that this function you must give me to implement as I want to use. So the function of the native keyword is implemented by the operating system, and Java can only be called.

Java is a cross-platform language, since it is cross-platform, the cost is to sacrifice some of the underlying control, and Java to achieve the control of the underlying, need some other language help, this is the role of native

Java Native Keywords

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.