0

What is a parameterized constructor?

Is it a continuous calling of tags in the main class? By seeing the parameter in the super class. It is can be done for 'n' number of times. https://code.sololearn.com/ceCK8X949CA0/?ref=app

11th Nov 2018, 6:11 AM
Kakarla Sundar Ganesh
Kakarla Sundar Ganesh - avatar
1 Respuesta
+ 9
constructor is a special method having same name as that of class which is used to initialize objects of that class [give values to object attributes] //Whats special in parameterized constructor[above one for default constructor where we don't pass any values to that constructor]? We pass values as parameters for that constructor to initialize objects of that class[by providing value of object attributes for every object created] https://www.sololearn.com/learn/Java/2157/
11th Nov 2018, 6:22 AM
Gaurav Agrawal
Gaurav Agrawal - avatar