In Java inheritance we can access parent class properties via the child class object, as there is a keyword extends
for achieving inheritance. But my question is that we can access any class non-static Data Member or methods via that class object reference only, so in case of inheritance we make child class object and access parent property so as java rule we can access any DM(Data Member) via that class object only so in this case according to me two possibilities are there:
When inheritance is taking place all the Data Member or Member Function are first copied into child scope and then we use them because now they are properties of Child so easily accessible but in this case same DM and methods are in both, child memory as well as in parent memory. That is not a good approach because if I have 100 properties in parent than all 100 are first copied into child memory and then used.
As we make child object implicitly the parent class object is made by compiler and all parent class method are called via that parent class object implicitly, but according to me that is not done. There is no object creation of parent in case of inheritance in Java. You can also check this via printing ref in child class as well as on parent class both have same reference so no parent object is created.
So my question is, how properties of parent are access via child object implicitly means internally how they achieve or is there any third approach for achieving the same used in java.