What is Native Interface in JAVA?

What is Native Interface in JAVA?

- JNI is the mechanism used to invoke methods written in languages such as C and C++. You can write code using language like C and C++ and declare its native methods and can use the same method in Java using JNI.

- JNI exposes JNI functions and pointers that can access Java objects and methods.

What is Native Interface in JAVA?

- Java Native Interface permits the developers to integrate the native code such as C or C++ into a Java application. To take the advantages of C programming and implementing the Java GUI features together makes the applications more efficient and powerful.

- JNI is used to handle situations where the entire application can not be written in Java.
Advantages and disadvantages of using JNI
JNI advantages - Using JNI, we can access c and c++ code which adds performance boost to JAVA..
Explain Exception Handling in JNI
JNI exceptions are handled by using the following: Throw( ) Throws an existing exception object. Used in native methods to rethrow an exception..
What is JNI?
JNI stands for Java Native Interface...
Post your comment