What is the purpose behind using Parameterized constructor. Will it be use when we have to execute the program with some predefined values?
not exactly...constructors run code only once...so if you instantiate (create) an object from a class it will run the code in the constructor...parameters in the constructor label an objects predefined value...
so if you have an object called dog
you can use parameters to make the dogs
remember constructors are named after the class...and never return a value
It looks like you're new here. If you want to get involved, click one of these buttons!