What are Native methods?Native methods are the methods implemented in other language like C. These methods can be used in Java classes using JNI API.
A native method is a method which is implemented in a non-java language that is targeted for a single machine type. Native methods can pass or return Java objects. To implement the native method, the keyword native is used. The implementation is in another language such as C or C++.
To compile the program which has native method, the following is used:
javac -jni Premium
|