OE-3.2 Inheritance, Interfaces, Packages & Strings
You can build class hierarchies with correct member access, use dynamic method dispatch and abstract classes, organize code into packages, define interfaces, and handle strings and wrapper types.
Dynamic method dispatch is the mechanism that makes polymorphism real at run time, and it is the concept most worth being able to explain out loud. Keep overloading and overriding separated in your head - same name different parameters versus same signature different class - because the exam and the interview both probe exactly there. String versus StringBuffer is the practical lesson: strings are immutable in Java, so building one in a loop the naive way is genuinely slow.
Work through these
Super and subclasses; member access rules; the super keyword
How one class builds on another, and what the child can reach. The access rules are the part people guess at and get wrong.
Method overriding and dynamic method dispatch
Replacing a parent's method, and the fact that which one runs is decided while the program is running. This is polymorphism proper, and the contrast with the compile-time kind from the previous topic is the point.
Abstract classes; using final with inheritance; the Object class
A class you cannot instantiate, a keyword that stops further inheritance, and the ancestor every class has. Together they are how a hierarchy is shaped deliberately rather than accidentally.
Defining, creating and accessing a package; CLASSPATH; importing packages
How code is organised into namespaces, and how the runtime finds it. The lookup path is the source of most beginner build failures, so understanding it saves hours.
Defining and implementing interfaces; nested interfaces
A promise about what a class can do, without saying how. It is the mechanism that gets you most of the benefit of multiple inheritance without its problems.
String and StringBuffer classes; StringTokenizer
Text handling, and the reason there are two classes for it: one cannot be changed and the other can. Building a long string with the wrong one is a classic performance mistake.
Wrapper classes and conversion between objects and primitives
The objects that stand in for primitive values when an object is required. Automatic conversion hides this most of the time and then surprises you at a boundary.
Inner classes: static, non-static, local and anonymous
Classes defined inside other classes, in four flavours. The anonymous kind is the one you will actually write, usually where a callback is needed.
Sign in to keep your progress.
Free resources
We haven't checked most of these for screen reader use yet.
Links last checked 30 Aug 2026.
Stuck here?
Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.
Checking your session…
Topics shown in module order.