Constructor:
- A constructor is used to initialize the state of an object.
- A constructor is invoked implicitly.
- A constructor must not have a return type.
- The Java compiler provides a default constructor if you don’t have any constructor in a class.
- The constructor name must be same as the class name.
Method:
- A method is used to expose the behavior of an object.
- A method must have a return type.
- The method is invoked explicitly.
- The method is not provided by the compiler in any case.
- The method name may or may not be same as class name.