4 ms·
JDK 17 record classes: record User(String name, Integer age, Boolean isActive) {} https://docs.oracle.com/en/java/javase/18/language/records.html https://do
by gavinray 4y ago
JDK 17 record classes:
record User(String name, Integer age, Boolean isActive) {}
https://docs.oracle.com/en/java/javase/18/language/records.html https://docs.oracle.com/en/java/javase/18/language/records.h...
- kaashif 4y agoIf you have mutable members you can still absolutely do myRecord.member().methodThatMutates(). The only way to stop this is to remove the mutable methods from the interface entirely, which is what I'm complaining about.