What is constructor overloading ?

  1. What is constructor overloading ?

    1. Constructor in a class with same name but different arguments

    2. And when we are creating object a particular constructor will be used that will be decided by the compiler

    3. Overloading takes place during compile time -> so when we are compiling that time only it is decided which method will be called.

    4. Give an example of Merchant in this case

      1. Means creating an object of merchant with parent

      2. Creating an object of merchant without parent