Javarevisited
Published in

Javarevisited

How to Resolve 3 Common Java Records Issues

2. How to mimic a Java record setter?

Photo by Tima Miroshnichenko from Pexels

Most Java developers expect a lot from records. Even so, there are limits and tradeoffs to records.

Common issues with records are:

  • Incorrect record usage
  • No ability to have setters
  • Equality of collection members isn’t what

--

--

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
Miloš Živković

Miloš Živković

Java and dev lifestyle stories. Subscribe for limitless reading: https://zivce.medium.com/membership Check out some of my e-books: https://zivce.gumroad.com/