Native Methods : native « Modifiers « SCJP






The native modifier applies only to methods.

The native modifier indicates that a method is implemented in platform-dependent code. 

A native method's body must be a semicolon (;) indicating that the implementation is omitted.



class NativeExample {
   native void doSomethingLocal(int i);

   static {
     System.loadLibrary("MyNativeLib");
   }
 }








3.11.native
3.11.1.Native Methods