Why a native method might be useful? - Java

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.
Use of shift operator in Java
Using shift operators in Java we can 1. Integer division and multiplication is done faster...
Need of wrappers like Integer, Boolean for int, boolean - Java
Wrapper classes are used to represent primitive data types as objects. Dealing primitive types as objects is sometimes easier....
Array vs ArrayList vs LinkedList vs Vector in java
Array vs ArrayList: ArrayList is much better than Array, when the size need to be increased dynamically. Efficiency is possible with arrays. ArrayList permits null elements...
Post your comment