Question
What 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);
}
}
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);
}
}
Answer: Option D
Submit Your Solution Below and Earn Points !
Submit Your Solution Below and Earn Points !
More Questions on This Topic :
Question 10.
What is the output of this program?
class A {
....
Submit Solution