A

Admin • 828.03K Points
Coach

Q. class A{
A(String s){}

A(){}
}

class B extends A{
B(){}
B(String s){
super(s);
}
void test(){
// insert code here
}
}

Which of the below code can be insert at line 7 to make clean compilation ?

  • (A) A a = new B();
  • (B) A a = new B(5);
  • (C) A a = new A(String s);
  • (D) A a = new A(String s); D. All of the above
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.