While studying
Java , I stuck with concept of java Method and Native Method.Both have some Difference.I
don't understand clearly what they meant?.
Please help me,Thank
you.
Wednesday, 27 December 2017
jvm - what is difference between Java Method And Native Method?
Answer
A Java method is generically a code block
with a name that you can write using plain
java.
public void
method() {
System.out.println("I'm a java
method!");
}
A
native method is a method that is linked to a native
library. Native libraries are linked to a java program through href="http://en.wikipedia.org/wiki/Java_Native_Interface" rel="nofollow">JNI (Java
Native Interface) or href="http://en.wikipedia.org/wiki/Java_Native_Access" rel="nofollow">JNA (Java
Native Access) and a native method looks like
this:
public native void
method();
It's
just a declaration, because the method implementation is done in the native
library.
php - file_get_contents shows unexpected output while reading a file
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...
-
I have an app which needs a login and a registration with SQLite. I have the database and a user can login and register. But i would like th...
-
I got an error in my Java program. I think this happens because of the constructor is not intialized properly. My Base class Program public ...
-
I would like to use enhanced REP MOVSB (ERMSB) to get a high bandwidth for a custom memcpy . ERMSB was introduced with the Ivy Bridge micro...
No comments:
Post a Comment