I have class A and class B that extends A
class A { public void play(){ System.out.println("A"): } } class B extends A { @Override public void play(){ System.out.println("B"): } }
Let's say I have something like this:
A myObj = new B(); ((A)myObj).play;
The system still displays B If it does not show A , since I raised it, and I completed the game. What can I call a super game, given that my object is of type B ?
java
Snake
source share