classA
{
final public int GetResult(int a, int b)
{
return 0;
}
class B extends A
{
public int GetResult(int aint b)
{
return 1;
}
public class Demo
{
public static void main(String arg9s[])
{
Bb=new B();
System.out.println("X=
“+b.GetResult(0,1));
}
Answers
Answered by
2
Answer:
The output will be: X= 0
Explanation:
The GetResult in class B is not allowed as you have declared GetResult of class A as final. So it can't be overridden.
Similar questions
Math,
15 days ago
Environmental Sciences,
15 days ago
Biology,
30 days ago
Science,
30 days ago
English,
8 months ago