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
5
u/pron98 Jan 06 '26
In whatever sense you think primitives are mutable or immutable, value classes are the same. They are neither less nor more mutable than primitives.
BTW, we say strings are immutable and yet you can do:
Primitives and value classes are immutable in the same sense as strings.