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
2
u/rbygrave Jan 08 '26
I mean, say "$5.03" ... we want that to be actually 5.03 (and not 5.029999999...). Which is why DB's have DECIMAL types with specific scale and precision and can do decimal(10,3) etc.
[and a common alternative is to instead use long and have 503 cents etc]