class A {   public final void show() {       System.out.println('A::show() called');    }}class B extends A {    public void show() {         System.out.println('B::show() called');    }}public class Main {    public static void main(String[] args) {        A b = new B();;        b.show();    }} - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
683 followers study24x7 13 Apr 2019 06:46 PM study24x7 study24x7

class A {   public final void show() {
       System.out.println("A::show() called");
    }
}
class B extends A {
    public void show() { 
     &...

See more

A

B::show() called

B

A::show() called

C

Exception

D

Compiler Error

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles