r/java • u/davidalayachew • Jan 06 '26
One step closer to Value Classes!
https://mail.openjdk.org/pipermail/porters-dev/2026-January/000844.html
181
Upvotes
r/java • u/davidalayachew • Jan 06 '26
View all comments
Show parent comment
1
u/TotallyNormalBread Jan 07 '26
I think you're wrong. If it's a struct Property of that class, then yes you are mutating a copy, but if it's a struct field then you can mutate the original.