What is a constructor in oop?


In OOP(Object-oriented programming) constructor is a special method. It is called whenever you create an object using¬†new¬†keyword. Constrictor enables an object to initialize itself at the time of its creation without the need to make a separate call to the instance method. It looks like a method but it is different from the method in … Read more