Explain why a native method might be useful to some types of programs Java Native methods are useful when an application can not be written completely in Java language. For instance, when a Java application needs to modify an existing application which was developed in another language, Java native methods are needed. The native API implementations allow all the Java applications to access the native functionality in a safe and platform independent mode. The JNI framework allows the native method utilization through Java objects in the similar fashion which Java code utilizes these objects. The JNI is an interface for code written in other languages. Certain time critical calculations like complicated mathematical equations as native code execution is faster than JVM code.
|