Polymorphism

Would you guys say this image best represents what happens internally in the JVM, I'm assuming the depiction in the photo has the reference 'obj' of type Base in the stack that is pointing to the object Base in the heap but its subclass is name 'Child' so I'm guessing the reference points to the parent object then through parent to the child which in turn copies over the methods to be implemented. So my question to that if true is the parent garbabe collected and the method is held in a temp object that is unknown to us and then passed back to the child during runtime ?
No description
5 Replies
JavaBot
JavaBot2y ago
This post has been reserved for your question.
Hey @CrackTheCode! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
CrackTheCode
CrackTheCodeOP2y ago
By that do you mean there may be no docs to explain this in detail
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
JavaBot
JavaBot2y ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one.

Did you find this page helpful?