1There are three types of constructors:
2Default, No-arg constructor and Parameterized.
3
4If you do not implement any constructor in your class,
5Java compiler inserts a default constructor into your code on your behalf.
6This constructor is known as default constructor.
7
8Constructor with no arguments is known as no-arg constructor
9
10Constructor with arguments(or you can say parameters) is known as
11Parameterized constructor.
1A constructor is a special method used to initialize objects in java.
2we use constructors to initialize all variables in the class
3when an object is created. As and when an object
4is created it is initialized automatically with the help of
5constructor in java.
6
7We have two types of constructors:
8Default Constructor
9Parameterized Constructor
10
11public classname(){
12}
13public classname(parameters list){
14}