Java JNI Question:
Download Questions PDF

Define JNI functions and pointers?

Answer:

JNI functions are those which are used by the developers to interact with JVM within a native method. Every JNI function receives a special parameter as its first argument – JNIEnv ; which points to a special JNI data structure of the type JNIEnv_ . One of the elements of JNI data structure is a ‘pointer to an array’ generated by JVM, and each element of this array is again a pointer to a JNI function. A JNI function can be invoked from the native method by referencing these pointers. Every JVM provides a unique implementation of the JNI functions.

Download Java JNI Interview Questions And Answers PDF

Previous QuestionNext Question
Advantages and disadvantages of using Java Native Interface (JNI)?Why does Java have different data types for integers and floating-point values?