1) A a=new B()
With A a=new B() you can access overrided method show but not show1 method, this method is accessible only from class B instances and also your LOCAL (Class A) variable k
Inside B class method show() === 8
Inside class variable:1
2) B b=new B()
With B a=new B() you can access overrided class A method show, method show1 inside class B and your LOCAL (Class B) variable k
Inside B class method show() === 8
Inside B class method show1() === 8
Inside class variable:8
3) A c=new A()
With A c=new A() you can access method show inside Class A, and your LOCAL (Class A) variable k
Inside A class method Show() === 1
Inside class variable:1