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, ..............);
Java
Topic: Constructors
What is Parameterized constructor?
Browse random answers:
What is the difference between a constructor and a method?
Why constructor does not have return type in java?
Where and how can you use a private constructor?
What are Characteristics of constructor:?
What is Parameterized constructor?
What is copy constructor?
What is Default constructor ?
What is Dynamic constructor ?
How should a contructor handle a failure?
What is virtual constructors/destructors?