loading...
re: I lost count of how many times I've had to help interns ditch bad OOP habits that Java's "best practice" taught them, and which were harming them w...

Java has great 'final' keyword and once you make field final, even Idea does not propose to create setter for it.
You missed the whole point of Integer and other relevant classes. They are immutable by design. And, frankly, boxing/unboxing works transparently so nobody actually cares. All cases where difference is sensible (for example, large collections), already covered by various libraries.
Java "best practices" described in "Effective Java" and they are quite close to what you're promoting. Unfortunately for Java there also Spring, which definitely promotes a number of very bad practices, including mutable beans and using exceptions as part of business logic.

code of conduct - report abuse