Java Native Interface (JNI), part of the Java platform, is an interface that enables the communication between Java applications running on a Java Virtual Machine (JVM) and native applications or libraries written in other programming languages (e.g. C, C++).
JNI provides improved performance in some low-level tasks (e.g. Math.sqrt (double a)) and enables communication with hardware devices (Bluetooth, Wi-Fi, etc.). However, there is a disadvantage in losing platform independence because such a program uses the library compiled for specific operating system.