Re:New language features since Java 8 to 17
by jcelerier on Monday October 25, 2021 @05:52AM
(#28986035)
> If I try to assign an int value to “3.2” will the language silently fail with null, or a round, or a floor, or a ceiling?
one may argue that the only correct thing to do here is a compile-time error
If I try to assign an int value to “3.2” will the language silently fail with null, or a round, or a floor, or a ceiling? Some level of understanding is necessary. I want it to also be reasonably explicit.
Java time library doesn’t meet that standard until Instant.