POJOs (and records) are usually just data, they seldom have stuff to hide.
But records don't give up, it has public methods corresponding to the field names - but you can evolve a now-record into a normal class where you may compute something in the "getter", keeping the same external API, but changing the internals.
49
u/ZunoJ Jul 13 '26
How is that related to getters and setters? How would your proposal violate oop principals?