Java hides the memory addresses of objects created on the heap. Objects are referenced. One object can have several links. Using = operator references refers to the object and using . operator references may refer to specific object behavior. Links and objects are stored in different memory cells.
If there is an objext X class of class C , then, in accordance with the specifications of the Java X language, it can have links of type C , or any superclass in the highest hierarchy or any interface implemented in C or any of the superclass in the highest hierarchy or any interface extended by any from these interfaces.
class A implements IA{} class B extends A implements IB{} interface IC extends IA{} interface IB extends ID{} class E{} class F extends B{}
Now new B() can have links of type A , B , IA , IB , ID , but cannot have a link of type E , IC , F as they do not belong to a higher hierarchy of leverage.
source share