Named Constructor
Last updated
Was this helpful?
Last updated
Was this helpful?
You can think of named constructors same as default constructors or parameterised constructors , but they have a name
You can have multiple named constructors inside the class definition
Named Constructor can also have optional argument as it's input , so it gives us a lot of flexibility for creating objects