Introduction to OOP | Chapter 17: The Polymorphic Variable : | next | previous | audio | real | text |
This process is termed down casting, or, since it is undoing the polymorphic assignment, reverse polymorphism.
Various different syntaxs are used for this, see the book.
Parent aVariable = ...; Child aCard; if (aVariable instanceof Child) aChild = (Child) aVariable;