1. 25

  2. 3

    It will arrive sooner in Java than in C#. Sad for the C# state of affairs. Way to go Java!

    1. 4

      I can’t get over the fact they used a double for the currency conversion. Even if it might be fine in this example (I think it’s not) it’s highly confusing.

      1. 1

        Does Java have a “native” decimal type?

        1. 6

          There is java.math.BigDecimal class in the standard library.

          1. 1

            Thanks! I’m a Java n00b.

        2. 1

          It is not relevant to the topic of the article, but yes, it is almost certainly wrong.

        3. 2

          It is nice, but maybe even better it would be to officially allow annotation preprocessors to modify the classes, so it will be possible to do this (like does Lombok in a dirty way) and even more (it would be a generic solution, not only single-purpose for records/pojo).