What will be the output of the program? class A { final public int GetResult(int a, int b) { return 0; } } class B extends A { public int GetResult(int a, int b) {return 1; } } public

A. An exception is thrown at runtime. B. Compilation fails. C. x = 1 D. x = 0

Your Answer

compilation fails,because A class method is final which we donot overridden this method

0
java programming test
Practice Mock Test
java programming test