Card 21 / 32: public class A { final public int GetResult(int a, int b) { return 0; }; } public class B extends A { public int GetResult(int a, int b) { return 0; }; } public class Test { public static void main(String[] args) { B b = new B(); System.out.println("x = "+b.GetResult(0, 1)); } }
A)
0
B)
1
C)
compilation succeeds
D)
compilation fails
Answer:
D) compilation fails
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|