Question: What is wrong in the following code? class Machine { String s; public Machine() { System.out.println(Object is created); this(null); } public Machine(String s) { this.s
What is wrong in the following code?
class Machine {
String s;
public Machine() {
System.out.println("Object is created");
this(null);
}
public Machine(String s) {
this.s = s;
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
