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

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

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 Programming Questions!