Java

Topic: Constructors

What is Parameterized constructor?

 A constructor can also take arguments. A constructor having some argument in it is called parameterized constructor. They allow us to initialize the various data element of different objects with different values.We have to pass the initial values as arguments to the constructor function when an object is declared. This can be done in two ways:· By calling the constructor explicitly< Classname > = (value, value,...........);· By calling the constructor implicitly(value, value, ..............);

Browse random answers: