Following are the differences between constructor and method.
- Constructor does not have a return type.
- Constructor does not have a return statement in its body.
- Name of constructor is the same as that of class in which it is declared.
public class ClassA {
public ClassA(){
}
}