Question: Will the following code compile? interface IA { public void do_stuff1(); } abstract class B { public abstract void do_stuff2(); } class C extends B

Will the following code compile?
interface IA { public void do_stuff1(); }
abstract class B {
public abstract void do_stuff2();
}
class C extends B implements IA {
@Override
public void do_stuff1() {
int a=1;
}
@Override
public void do_stuff2() {
int b=1;
}
}
class Main {
public static void main(String[] args) {
C myC = new C();
}
}
No, Class C can't extend one class (B) and implement an interface (1A), it can only do one or the other. No, Class C doesn't correctly override do_stuff2() No, class C cannot be instantiated because it implements an interface. Yes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
