What are Native methods?

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
What is Bytecode?
What is Bytecode? - The Java class file contains bytecode which is being interpreted by JVM. Bytecode is introduced in Java to...
this vs. super keyword
this vs. super keyword - 'this' refers to current object instance....
What are JAR, WAR and EAR files?
What are JAR, WAR and EAR files? - JAR - Java Archive File is used to package classes and property files......
Post your comment