Inheritance, interfaces, polymorphism
The block that decides your grade. Abstract classes vs interfaces, overriding vs overloading, clean super calls.
- inheritance
- abstract classes
- interfaces
- polymorphism
- super
- overriding
PROGRAMMING II · EXAM · 1:1
Four to five sessions before the exam. We work through inheritance, abstract classes and interfaces, make generics tangible and practise recursion until you derive it yourself.
Dennis LIVE Senior Java Engineer · OOP responds ≤ 2 h , View profile Free first chat →
Already decided? Straight to a session →
Live from a Programming II session
// Which method is called? Animal a = new Dog(); a.sound(); // Dog.sound(), not Animal.sound() // dynamic dispatch: the runtime type wins
Programming II builds on the basics and turns the difficulty towards OOP design. Typical is an inheritance block, a generics-and-collections block and a recursion block. We drill each on your past papers.
Pay per session or grab an exam package. The intro call is free: if it is not a fit, you have lost nothing.
The Programming II classic: dynamic dispatch. We separate cleanly what the compiler allows from what happens at runtime.
What output does the following code produce? Justify it in terms of the static and dynamic type.
class Animal { String sound() { return "..."; } } class Dog extends Animal { String sound() { return "Woof"; } } Animal a = new Dog(); System.out.println(a.sound());
The output is Woof: the static type Animal allows the call, the dynamic type Dog decides which method runs.
a has the static type Animal. The compiler only allows methods Animal knows. sound() exists in Animal, so it compiles.
At runtime a points to a Dog object. For overridden methods the dynamic type decides which implementation runs.
Dog overrides sound(), so Dog.sound() is called. The output is Woof. That is dynamic dispatch.
The compiler checks the static type, runtime picks the method via the dynamic type. On overriding, the dynamic type always wins.
That is exactly what we practise in your session: telling the static and dynamic type apart cleanly.
Start now and invest 4 to 5 sessions and your chances are good. Less time? We compress. More? We go deeper, into design patterns or functional interfaces.
You share your screen, we go through your latest exercise and exam scope. We see where you really stand, not where you think you do.
We build class hierarchies, clear up abstract classes vs interfaces and practise dynamic dispatch on your actual exam material.
Read and write generic methods, pick the right collection and work recursive tasks through the call tree. You type, I probe.
You solve your university's mock exam against the clock. We review every task: what is solid, where you get stuck and which task types are likely to come up.
I built Study IT because I have seen first-hand how IT teaching at university falls apart.
The people who teach here know code from real projects. Practice decides, not the diploma.
Reach me directly: marcel.schmidtpeter@study-it.education
Inheritance, interfaces, generics and recursion from real projects, not tutorials. He surfaces the typical thinking errors and shows how examiners grade the tasks.
„Programmieren versteht man, wenn man weiß, warum eine Lösung funktioniert. Mein Ziel: dass du Code nicht abschreibst, sondern selbst hinkriegst."
If Programming II is not your bottleneck, one of these pages probably fits better.
Free intro call, 30 minutes. We look at your material and tell you honestly how many sessions you need.