what is the use/perpose of having a method antive?

Answer Posted / imtiyaz

if you want to call a methods which are specific to the
platform or if you want to use the OS calls or if you want
to use functionality which is developed in other language
we go through native interface.

In a real world we need to execute statements which are
specific to platform which java may or may not do, and
other language can do much faster than java at that time we
use to write the methods in that language and use that code.

And sometimes the code already developed in other language
and it is very cost effective or time consuming to convert
the code into java at that moments also we use java native
interface.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we compare two strings in java?

554


Highest level event class of the event-delegation model?

3493


Where is the find and replace?

526


What does singleton mean in java?

505


How to sort a collection of custom Objects in Java?

592






Can you change array size in java?

524


What is files manifesting?

1720


What are different types of control structures?

483


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1342


Is void a wrapper class?

521


What's the purpose of static methods and static variables?

586


What an i/o filter?

558


What class allows you to read objects directly from a stream in java programming?

503


What is json parser in java?

606


What is final class?

569