What is the output of running the class C in (a)? What problem arises in compiling the program in (b)?
(a)
class A {
public A() {
System.out.println(
"A's no-arg constructor is invoked");
}
}
class B extends A {
}
public class C {
public static void main(String[] args) {
B b = new B();
}
}
(b)
class A {
public A(int x) {
}
}
class B extends A {
public B() {
}
}
public class C {
public static void main(String[] args) {
B b = new B();
}
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.