Infosys Interview Question

What is a constructor and what is constructor overloading?

Interview Answer

Anonymous

Nov 9, 2019

A constructor is a method that is run when a class is initialized. Constructor overloading is when you have more than one constructor for a class but each constructor has different parameters.