The trap: a base constructor calling an overridable method
The trap: a base constructor calling an overridable method
Answer
class Glyph { Glyph() { draw(); } void draw() { System.out.println("Glyph.draw"); } }
`Glyph()` calls the overridable `draw()`. In a subclass that overrides `draw()`, the subclass version runs before the subclass's fields are initialized — reading default (zero) values.