r/java • • Jul 14 '26

New candidate JEP: 401: Value Objects (Preview)

https://mail.openjdk.org/archives/list/valhalla-dev@openjdk.org/thread/IUNJJ3WP3X3XHP3QZTXXSSCPKFDNTK3W/
87 Upvotes

45 comments sorted by

View all comments

Show parent comment

3

u/FirstAd9893 Jul 15 '26 edited Jul 15 '26

Why not have all classes be value classes?

Value classes are immutable, which is the big reason why.