Example of parameterized constructor
class cons
{ ㄴ
int rinei
double mksi
cons Cint ab, double mlll paramete-
rizedo constructor
{
al;
mks = ml ;
rino =
Answers
Answered by
0
Explanation:
Example of Parameterized Constructor
For example, when we create the object like this MyClass obj = new MyClass(123, "Hi"); then the new keyword invokes the Parameterized constructor with int and string parameters (MyClass(int, String)) after object creation.
Similar questions
History,
1 month ago
Social Sciences,
1 month ago
Social Sciences,
3 months ago
Math,
3 months ago
Math,
8 months ago
Science,
8 months ago
Hindi,
8 months ago