The Old Rule That Caused So Much Pain From Java 1.0 through Java 24, a constructor that extended another class had one rigid rule: super(...) or this(...) must be the first statement in the constructor body. This was enforced by the compiler. Not because of a deep technical reason — but because the JVM specification had always required that the superclass be fully initialized before the subclass could do anything with the object.
Continue reading »Jep513
1 post in this section