Java 14, bine ai venit

Avem Java 14!!

De interes:

  • Records - adio POJO. Si C# se alatura in versiunea 9. O idee de sintaxa in C# :smiley: :heart_eyes:
    public record Point(double x, double y) { } -> getters, setters, toString, constructor si altele.
  • Pattern Matching instanceof
    if (o instanceof String s)
      System.out.println(s.length);
  • Helpful NullPointerException -> de unde vine acel null?

Plus multe alte api-uri :smiley:

Have fun!

2 Likes