Question: Q. Analyze and the select the correct answeri's: public class A extends B{ } class B{ public B(String s){ } } A. The program has

Q. Analyze and the select the correct answeri's: public class A extends B{ } class B{ public B(String s){ } } A. The program has a compilation error because A does not have a default constructor. B. The program has a compilation error because the default constructor of A invokes the default constructor of B, but B does not have a default constructor. C. The program would compile fine if you add the following constructor into A: A{String s) {} D. The program would compile fine ifyou add the following constructor into A: A{String s} { super{s); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
