MCQ
Single Best Answer
Not Set
QWhat will be the output?
interface A{
public void method1();
}
class One implements A{
public void method1(){
System.out.println("Class One method1");
}
}
class Two extends One{
public void method1(){
System.out.println("Class Two method1");
}
}
public class Test extends Two{
public static void main(String[] args){
A a = new Two();
a.method1();
}
}
ID: #2256
Inheritance in Java MCQ
2,454 views
Question Info
#2256Q 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: Option C
Explanation
Class One method1
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic