is a special method in a class that is called when an instance (object) of that class is created and the primary purpose of a constructor is to initialize the newly created object , often by setting initial values for its attributes

why constructor is a special function :

The types of Constructor :

Default Constructor

Parameterized Constructor

Private Constructor

Static Constructor

Copy Constructor