The Java Version Almanac
javaalmanac.io
Feedback on this page?

New APIs in Java 20

Comparing Java 20 (20-ea+24-1795-open) with Java 18 (18.0.2.1+1-tem).

Element Modification
java.base
    java.io
      BufferedInputStream
        • added
        InvalidClassException
          InvalidObjectException
            • + final
            ObjectStreamException
              PushbackInputStream
                • added
                java.lang.constant
                  ClassDesc
                    java.lang.invoke
                      • + sealed
                      • + sealed
                      MethodHandles
                        • + sealed
                        java.lang.module
                          ModuleDescriptor.Exports
                            ModuleDescriptor.Opens
                              ModuleDescriptor.Requires
                                ModuleDescriptor
                                  java.lang.ref
                                    ReferenceQueue
                                      • - throws IllegalArgumentException
                                      • + sealed
                                      java.lang.reflect
                                        Executable
                                          • + abstract
                                          Field
                                            Parameter
                                              Member
                                                java.lang
                                                  Character.UnicodeBlock
                                                    • added
                                                    • added
                                                    • added
                                                    • added
                                                    • added
                                                    • added
                                                    • added
                                                    Class
                                                      Double
                                                        Float
                                                          Integer
                                                            Long
                                                              Math
                                                                StrictMath
                                                                  • + deprecated
                                                                  • + forRemoval
                                                                  Thread
                                                                    • + deprecated
                                                                    Character.UnicodeScript
                                                                      • added
                                                                      • added
                                                                      java.math
                                                                        BigDecimal
                                                                          BigInteger
                                                                            java.net
                                                                              • + sealed
                                                                              SocketException
                                                                                URL
                                                                                  • + deprecated
                                                                                  • + deprecated
                                                                                  • + deprecated
                                                                                  • + deprecated
                                                                                  • + deprecated
                                                                                  • + deprecated
                                                                                  • added
                                                                                  java.nio.channels
                                                                                    FileChannel
                                                                                      java.nio.file.spi
                                                                                        FileSystemProvider
                                                                                          java.nio.file
                                                                                            Path
                                                                                              • added
                                                                                              java.nio
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                • + sealed
                                                                                                java.security.cert
                                                                                                  CertStore
                                                                                                    • - final
                                                                                                    java.security.interfaces
                                                                                                      DSAKeyPairGenerator
                                                                                                        • - throws InvalidParameterException
                                                                                                        • - throws InvalidParameterException
                                                                                                        java.security.spec
                                                                                                          PSSParameterSpec
                                                                                                            • + deprecated
                                                                                                            • + deprecated
                                                                                                            java.security
                                                                                                              InvalidParameterException
                                                                                                                • added
                                                                                                                • added
                                                                                                                java.text
                                                                                                                  DecimalFormatSymbols
                                                                                                                    java.time.chrono
                                                                                                                      IsoChronology
                                                                                                                        JapaneseChronology
                                                                                                                          MinguoChronology
                                                                                                                            ThaiBuddhistChronology
                                                                                                                              Chronology
                                                                                                                                java.time.format
                                                                                                                                  DateTimeFormatterBuilder
                                                                                                                                    DateTimeFormatter
                                                                                                                                      java.time
                                                                                                                                        • + sealed
                                                                                                                                        ZoneOffset
                                                                                                                                          java.util.concurrent
                                                                                                                                            CompletableFuture
                                                                                                                                              • + final
                                                                                                                                              Executors
                                                                                                                                                ForkJoinPool
                                                                                                                                                  ForkJoinTask
                                                                                                                                                    ForkJoinWorkerThread
                                                                                                                                                      FutureTask
                                                                                                                                                        • + final
                                                                                                                                                        • + implements AutoCloseable
                                                                                                                                                        Future
                                                                                                                                                          java.util.regex
                                                                                                                                                            Matcher
                                                                                                                                                              • added
                                                                                                                                                              • added
                                                                                                                                                              Pattern
                                                                                                                                                                • added
                                                                                                                                                                MatchResult
                                                                                                                                                                  • added
                                                                                                                                                                  • added
                                                                                                                                                                  • added
                                                                                                                                                                  • added
                                                                                                                                                                  • added
                                                                                                                                                                  java.util.spi
                                                                                                                                                                    ToolProvider
                                                                                                                                                                      java.util.zip
                                                                                                                                                                        ZipInputStream
                                                                                                                                                                          • added
                                                                                                                                                                          • added
                                                                                                                                                                          • added
                                                                                                                                                                          • added
                                                                                                                                                                          • added
                                                                                                                                                                          • added
                                                                                                                                                                          java.util
                                                                                                                                                                            • + sealed
                                                                                                                                                                            HashMap
                                                                                                                                                                              HashSet
                                                                                                                                                                                IdentityHashMap
                                                                                                                                                                                  • added
                                                                                                                                                                                  • added
                                                                                                                                                                                  • + sealed
                                                                                                                                                                                  LinkedHashMap
                                                                                                                                                                                    LinkedHashSet
                                                                                                                                                                                      Locale
                                                                                                                                                                                        • + deprecated
                                                                                                                                                                                        • + deprecated
                                                                                                                                                                                        • + deprecated
                                                                                                                                                                                        Objects
                                                                                                                                                                                          Random
                                                                                                                                                                                            WeakHashMap
                                                                                                                                                                                              javax.crypto.spec
                                                                                                                                                                                                OAEPParameterSpec
                                                                                                                                                                                                  • + deprecated
                                                                                                                                                                                                  javax.net.ssl
                                                                                                                                                                                                    KeyManagerFactory
                                                                                                                                                                                                      • - final
                                                                                                                                                                                                      SSLHandshakeException
                                                                                                                                                                                                        SSLKeyException
                                                                                                                                                                                                          SSLParameters
                                                                                                                                                                                                            SSLPeerUnverifiedException
                                                                                                                                                                                                              SSLProtocolException
                                                                                                                                                                                                                TrustManagerFactory
                                                                                                                                                                                                                  • - final
                                                                                                                                                                                                                  SSLSessionContext
                                                                                                                                                                                                                    • - throws IllegalArgumentException
                                                                                                                                                                                                                    • - throws IllegalArgumentException
                                                                                                                                                                                                                    java.compiler
                                                                                                                                                                                                                      javax.lang.model.element
                                                                                                                                                                                                                        ElementKind
                                                                                                                                                                                                                          javax.lang.model.util
                                                                                                                                                                                                                            Elements
                                                                                                                                                                                                                              javax.lang.model
                                                                                                                                                                                                                                SourceVersion
                                                                                                                                                                                                                                  java.desktop
                                                                                                                                                                                                                                    java.awt.color
                                                                                                                                                                                                                                      • + final
                                                                                                                                                                                                                                      • + final
                                                                                                                                                                                                                                      • + sealed
                                                                                                                                                                                                                                      java.awt.desktop
                                                                                                                                                                                                                                        • + sealed
                                                                                                                                                                                                                                        • + sealed
                                                                                                                                                                                                                                        java.awt.dnd
                                                                                                                                                                                                                                          • + final
                                                                                                                                                                                                                                          java.awt.event
                                                                                                                                                                                                                                            • + sealed
                                                                                                                                                                                                                                            java.awt.geom
                                                                                                                                                                                                                                              CubicCurve2D.Double
                                                                                                                                                                                                                                                getBounds2D()
                                                                                                                                                                                                                                                CubicCurve2D.Float
                                                                                                                                                                                                                                                  getBounds2D()
                                                                                                                                                                                                                                                  CubicCurve2D
                                                                                                                                                                                                                                                    • + sealed
                                                                                                                                                                                                                                                    QuadCurve2D.Double
                                                                                                                                                                                                                                                      getBounds2D()
                                                                                                                                                                                                                                                      QuadCurve2D.Float
                                                                                                                                                                                                                                                        getBounds2D()
                                                                                                                                                                                                                                                        QuadCurve2D
                                                                                                                                                                                                                                                          java.awt
                                                                                                                                                                                                                                                            • + final
                                                                                                                                                                                                                                                            • + sealed
                                                                                                                                                                                                                                                            • + final
                                                                                                                                                                                                                                                            • + final
                                                                                                                                                                                                                                                            • + sealed
                                                                                                                                                                                                                                                            javax.sound.midi
                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                              javax.swing.plaf.basic
                                                                                                                                                                                                                                                                BasicDirectoryModel
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                  • + sealed
                                                                                                                                                                                                                                                                  BasicToolBarUI
                                                                                                                                                                                                                                                                    • + forRemoval
                                                                                                                                                                                                                                                                    javax.swing.plaf.synth
                                                                                                                                                                                                                                                                      SynthPasswordFieldUI
                                                                                                                                                                                                                                                                        • added
                                                                                                                                                                                                                                                                        javax.swing.text.html
                                                                                                                                                                                                                                                                          • + final
                                                                                                                                                                                                                                                                          • + final
                                                                                                                                                                                                                                                                          • + final
                                                                                                                                                                                                                                                                          javax.swing.text
                                                                                                                                                                                                                                                                            DefaultEditorKit
                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                              • + sealed
                                                                                                                                                                                                                                                                              javax.swing
                                                                                                                                                                                                                                                                                • + sealed
                                                                                                                                                                                                                                                                                • + sealed
                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                java.net.http
                                                                                                                                                                                                                                                                                  java.net.http
                                                                                                                                                                                                                                                                                    HttpClient.Builder

                                                                                                                                                                                                                                                                                      This report is based on simple comparison of all public and protected APIs of the java.* and javax.* packages of JDK builds 20-ea+24-1795-open and 18.0.2.1+1-tem. It does not make statements about compatibility.

                                                                                                                                                                                                                                                                                      For the latest Java versions the corresponding CSRs (Compatibility & Specification Review) are linked for a quick reference to find out about the reasoning of the change.

                                                                                                                                                                                                                                                                                      More detailed API comparisons based on the japicmp tool can be found here.