Java interview questions: – Mention Native Interface in JAVA?

JNI is a mechanism by which you can invoke method written in native language like C and C++. Native languages allow you to use a platform specific feature which is not in control of java language. For instance if you want java to interact directly with some specific type of hardware it will extremely difficult to achieve it. So you can write a C code and declare its native methods and call the same in Java.

java

Figure: – JNI in action

The above figure indicates how JVM interacts with JNI and without. With JNI it has the extra layer of C or C++ DLL i.e. native source code or native methods which interacts with the operating system.

See the following video on Batch Processing in Hibernate: –


Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s