Single Choice
Not Set
Q
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 ?
ID: #2264
Inheritance in Java MCQ
1,310 views
Question Info
#2264Q ID
Not SetDifficulty
Inheritance in Java MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
A a = new B();
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic