Java 16 introduces a new language feature called Records. Records have been a part of Java 14 and 15 but were still in preview.

Photo by on

What is a Record?

Record is a new type of declaration to define immutable data classes.

It is used instead of class and allows to avoid the usual ceremony of creating hashCode(), equals(), toString(), getters, and constructor.

For those who are familiar with Scala — it is similar to a case class, for those…

Text blocks, Record classes, and more

Photo by on

I distinctly remember when Java 8 was released in 2014. That was an enormous step forward, a step towards making Java a functional programming language method references, functional interfaces, default methods, streams, null-safe optionals, what’s more, to want?

But Java was already so behind any other modern language that adding…

Konrad Tendera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store