Flexible Constructor Bodies: Validating Before super()

1 month ago 40
Club.noww.in
Here’s a small confession. For years I wrote constructors that did their validation in the wrong place, and I knew it. The check belonged at the very top, before any parent class got to do its work. But Java would not let me put it there. That rule is finally gone. Since JDK 25, a …
Read Entire Article