120k views
0 votes
Constructors that contain parameters are called ____.

User Jobrocol
by
5.3k points

2 Answers

3 votes
they are called Parameterize constructor
User Bame
by
5.0k points
1 vote

It may be necessary to initialize the various data elements of different objects with different values when they are created. This is achieved by passing arguments to the constructor function when the objects are created. The constructors that can take arguments are called parameterized constructors.

User Wade J
by
5.1k points