Inheritance and Polymorphism
extends, super, overriding, dynamic dispatch, abstract classes, interfaces, sealed types, final, composition and nested classes, down to the bytecode.
Phase 4 taught you to build one class at a time. Real programs have families of classes: a Dog and a Cat that are both animals, a card payment and a UPI payment that are both payments. This phase is about how Java lets classes share behaviour (inheritance), stand in for each other (polymorphism), and promise behaviour (abstract classes and interfaces).
Every topic goes from an everyday picture to the real mechanism: what the compiler checks, which bytecode instruction it emits (invokevirtual, invokeinterface, invokespecial), how the JVM finds the right method at run time through vtables, and how the JIT makes that fast. You will also meet the modern tools: default methods (Java 8), private interface methods (Java 9) and sealed classes (Java 17).
The phase ends with the design judgement that interviews test: when inheritance is the wrong tool and composition is better, and how nested and anonymous classes work under the hood. Where an idea is really a design pattern, we link to the System Design course's pattern pages so you can see it used at scale.