What is constructor ? Explain different types of constructor in brief.
Answers
Answered by
2
I hope it helps u
plz mark me as brain list
and plz follow me
Attachments:
Answered by
8
▽Constructor ▽
Constructor are specialised methods which has the same name as the class name and it is used to initialise the data members in the time of object creation .
Constructors can be mainly of two types →
• Argument constructor
=> A constructor without any parameters or argument is known as argument constructor
• Parameterized constructor
=> A constructor that can take parameters or arguments are called parameterized constructor
Similar questions