The code for achieving the same outcome is far more straightforward from Java 9 onwards, simply requiring calling the List.of() method, for example, List.of("element1","element2").
Read full article from The best new features in the Java programming language: Reasons to upgrade from Java 8 - TechRepublic
No comments:
Post a Comment