How does the native language understand data types in JAVA?

How does the native language C or C++ understand data types in JAVA?

Java native Interface (JNI) is a programming framework that allows Java code to interact with code written in another language, typically C or C++. JNI enables one to write native methods to handle situations when an application cannot be written entirely in the Java programming language.

It is also used to modify an existing application written in another programming language to be accessible to Java applications. Many of the standard library classes depend on JNI to provide functionality to the developer and the user. The Java Development Kit (JDK) provides tools and library routines that help the Java programmer interface with native code. It is important that the data types that are passed between Java and native code have the same properties. Like jboolean data type of native language is same as Boolean data type of Java.
Exception handling in JNI
There are two ways to handle an exception in native code: -The native method can choose to return immediately, causing the exception to be thrown in the Java code ....
Advantages and disadvantages of using JNI
Advantages of JNI: 1. JNI enables one to write programs in native language or method when an application cannot be written entirely in the Java programming language...
Difference between ServletsContext and ServletConfig
ServletConfig: It defines how a servlet is configured. ServletConfig is implemented by the servlet container to initialize a single servlet using init ()....
Post your comment