Answer:
Their is no MyClassC class is found in the code.
The correct code for the given question isto create a MyClassC class with parameterized constructor.
The code is given below
public class MyClassC
{
int p;
public MyClassC(int v) // hold the integer value
{
p=v;
}
}// end class MyClassc
Step-by-step explanation:
According to the code as given in the question in the main method it will call parametrized constructor of MyClassC but their is no such kind of class be there so we will create a class MyClassC and also create a parametrized constructor with integer parameter.
The final correct program is given below.
public class MyClassC // class
{
int p;
public MyClassC(int v)
{
p=v;
}
}// end class MyClassC
public class MyClassD
{
public static void main (String args []) // main method
{
MyClassC m = new MyClassC (23); // call the parametrized constructor of class c
} // end main
} // end class MyClassD