Question: What is wrong in the following code? public class C { private int p; 3 public C ( ) { System.out.println ( C '

What is wrong in the following code?
public class C {
private int p;
3
public C(){
System.out.println("C's no-arg constructor invoked");
this(0);
7}
8
public C(int p){
p = p;
11}
12
public void setP(int p){
p = p;
15}
16}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!