Below are 2 methods which have no body:
1. abstract: Abstract methods don’t have body, they just have method signature. If a class has an abstract method it should be declared abstract, the vice versa is not true, which means an abstract class doesn't need to have an abstract method compulsory. If a regular class extends an abstract class, then the class must have to implement all the abstract methods of abstract parent class or it has to be declared abstract as well.
public abstract class A
{
abstract void getinfo();
}
2. native: A native method is a Java method (either an instance method or a class method) whose implementation is also written in another programming language such as C/C++.
Moreover, a method marked as native cannot have a body and should end with a semicolon. Example
public class A
{
[ public | protected | private] native [return_type] methodName();
}