Class A calls the public method f() in the Constructor. Class B overrides method f() with its own implementation.
A
f()
Suppose you inta
You're correct, that is the way it works. It's not recommended practice though, because somebody who inherits from your class can unintentionally break it.