Plays from YouTube. Watch on YouTube
How can Java execute different behavior through one common type?
Meet Inheritance, Interfaces and Polymorphism: a visual, example-driven explanation of the decisions behind reliable Java programs.
We start with inheritance models an is-a relationship and abstract classes are partial designs, using concrete examples to expose the underlying mechanism.
From there, we examine runtime dispatch selects behavior, super refers to parent behavior, and their implications for real code.
Then we connect casting changes the view to primitive casts are conversions, including mistakes to avoid and boundaries to respect.
Finally, we work through composition is an alternative and program to abstractions.
The big idea: Separate what clients need from how it is done.
Java and software design explained visually, one concept at a time.