I’m kind of stuck in the following question:
What two mechanisms of the Java language allow the type of the object reference variable to be "different" than the type of the object to which it refers? Give specific examples to illustrate. In what sense do they not differ at all?
My current answer is that it “implements” and “extends” the right? And they are similar because both of them will make a class that at least will have all the signatures of the superclass method, which can be relevant, abstract, or an interface. It's right? Thanks in advance!
source
share