Computer Science, asked by atharvasahu66894, 4 months ago

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 SULTHANASAJI
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