Casting with inheritance: A superclass reference can be cast to a subclass type if the runtime object is actually that subclass.
How to apply it: Predict ClassCastException when casting to an incompatible type.
Course: AP Computer Science A · Unit: Inheritance
Practice questions about Casting with inheritance on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.