Single Choice
Not Set
QWhat will be the output?
interface A{
public void method();
}
class One{
public void method(){
System.out.println("Class One method");
}
}
class Two extends One implements A{
public void method(){
System.out.println("Class Two method");
}
}
public class Test extends Two{
public static void main(String[] args){
A a = new Two();
a.method();
}
}
ID: #2280
Java Interfaces And Abstract Classes MCQ
2,257 views
Question Info
#2280Q ID
Not SetDifficulty
Java Interfaces And Abstract Classes MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
will print Class Two method
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic