What is a native method?

What is a native method?

A native method is the Java interface to non-Java code. It is Java\'s link to the \"outside world\". A native method is a Java method whose implementation is provided by non-java code. A native method is one for which the body of the method is defined elsewhere, entirely outside the Java Virtual Machine, in a library. Only methods can be declared as native. A native code is written in a non-Java language, typically C or C++, and compiled for a single target machine type.

Syntax :
native public void Native1( ) ; 

By:Jalees
Date:2015-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher