I didn't understand that why we are use constructor ?
A constructor is used to interstitial variables in a class. It is aromatically called when a new class object is created. A constructor name is same as the class name.
It looks like you're new here. If you want to get involved, click one of these buttons!