Sail E0 Webinar
Question
Class A{
A(String s){}
A(){}
}
1. class B extends A{
2. B(){}
3. B(String s){
4. super(s);
5. }
6. void test(){
7. // insert code here
8. }
9. }
Which of the below code can be insert at line 7 to make clean compilation ?
Options:
A .  A a = new B();
B .  A a = new B(5);
C .  A a = new A(String s);
D .  All of the above
E .  None of these
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers