Sail E0 Webinar
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); }}
Options:
A .  Compiler Error
B .  None of these
C .  30
D .  15
E .  20
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers