1. Preface

Just a few days ago, I introduced a Java14 Useful preview feature Java 14 The new features JEP 359: Records(Preview).Java 14  It's just 17 The official version was released on July . Most people still use it Java 8 , I can't even eat the exhaust gas . But not at all LTS edition , Don't panic, everyone .

2. Java14 New characteristics

This version contains  JEP(Java/JDK Enhancement Proposals,JDK Enhanced proposal ) Than  Java 12  and  Java13  All in all . in total 16 A new feature . I'll give you a brief list here :

  • 305: instanceof The pattern match ( preview )
  • 343: Packaging tools (Incubator)
  • 345: G1 Of NUMA Memory allocation optimization
  • 349: JFR Flow of events
  • 352: Non atomic byte buffer mapping
  • 358: Friendly null pointer exception
  • 359: Records ( preview )
  • 361: Switch expression ( standard )
  • 362: Abandoning Solaris and SPARC port
  • 363: remove CMS(Concurrent Mark Sweep) Garbage collector
  • 364: macOS On the system ZGC
  • 365: Windows On the system ZGC
  • 366: Abandoning ParallelScavenge + SerialOld GC Combine
  • 367: remove Pack200 Tools and API
  • 368: Text block ( The second preview )
  • 370: External memory API (Incubator)

For details, please go to the official documents . But I personally don't think there are many new features available , Still, don't panic .

3. How do we choose JDK edition

In fact, there are many students who don't understand , since JDK  After modifying the release strategy, the iteration speed is accelerated , From year to year 3 month 、9 Each month a new GA edition . We all know that migration costs are high . So we should know how to choose JDK edition . Here I summarize a few points :

  • Considering business cost and software agreement , Use as much as possible OpenJDK , There are many excellent ones on the market OpenJDK, We're using it AWS Of Corretto.
  • Use as much as possible LTS edition , It's not just JDK All software use long-term support version as much as possible .
  • Try not to upgrade old projects blindly JDK, Unless you have enough time and energy to toss .

4. summary

Today I briefly introduced Java14 Release of information , There are also some upgrades JDK The advice of , I personally don't think it's necessary to upgrade , It's OK to study it . I don't know what the students think , You can leave a message to discuss