Java Records are here
The biggest criticism on Java is the large amount of boilerplate code it forces one to write. Python and newer languages like Kotlin seem to score over Java on this front.
Boilerplate code is not always bad. Sometimes verbose code is easy to understand and maintain especially if you are working with relative junior team members with a high churn rate.
However one case where boilerplate code is pure waste is when you have a java class with nothing more then half a dozen or more getter/setter. To make it worst, in a large project worth it’s salt you would be have dozens of classes like this.
At last, Java Records a new feature in JDK 14 ( still in preview mode ) comes to rescue. Each of the boilerplate data class described above now can be define in one single line. This is fantastic addition to Java and in my opinion go down as a pathbreaking feature in history of Java.
While we wait for Java Records to be GAed, you can read/see more about it at