what is a parametrized constructer?
Answers
Answered by
1
Heya friend howz uh ?
Myself Karya Khurrana (ROSANNAKARYA03_Expert)
It may be necessary to initialise 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.
hope this helps! :D
Myself Karya Khurrana (ROSANNAKARYA03_Expert)
It may be necessary to initialise 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.
hope this helps! :D
humblestudent:
thank you so much
Answered by
2
A Paramterized constructor is a member function with same name as the class name which is used to intialize the object variables by passing parametric values at the same time of its creation.
Similar questions
English,
8 months ago
Science,
8 months ago
CBSE BOARD X,
1 year ago
Psychology,
1 year ago
Biology,
1 year ago