Practice · 3 of 3
Trace the greeting chain
CHALLENGE
Difficulty: advanced+25 XP
Trace this hierarchy and call sequence **on paper**, then return the exact printed text (lines joined with |):
``java
public class Greeter {
public String greet() {
return "Hello";
}
public String greetAll() {
return greet() + "!";
}
}
public class Loud extends Greeter {
public String greet() {
return "HELLO";
}
}
`
Calls: new Greeter().greetAll(), then new Loud().greetAll().
greetAll` is NOT overridden — but it still dispatches.
Press Submit to check your solution.
Back to lesson: Practice: Polymorphism gauntlet