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