Native methods are defined in Java class to call the methods written in other programming languages like in C or C++. Following code segment shows how to define a native method:
class HelloWorld {
public native void displayHelloWorld();
...
}
Native methods don't have body.