Single Choice
Not Set
QWhat will be the output?
class One{
final int a = 15;
}
class Two extends One{
final int a = 20;
}
public class Test extends Two{
final int a = 30;
public static void main(String args[]){
Test t = new One();
System.out.print(t.a);
}
}
ID: #2261
Inheritance in Java MCQ
2,364 views
Question Info
#2261Q 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
Compiler Error
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic