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

New APIs in Java 20

Comparing Java 20 (20-ea+4-158-open) with Java 17 (17.0.3+7-tem).

Element Modification
java.base
    java.io
      FileInputStream
        InvalidClassException
          InvalidObjectException
            ObjectInputStream.GetField
              • + throws ClassNotFoundException
              • + final
              ObjectStreamException
                PrintStream
                  java.lang.invoke
                    • + sealed
                    • + sealed
                    • + final
                    MethodHandles
                      • + sealed
                      java.lang.module
                        ModuleDescriptor.Exports
                          • added
                          ModuleDescriptor.Opens
                            • added
                            ModuleDescriptor.Requires
                              • added
                              ModuleDescriptor
                                • added
                                java.lang.ref
                                  ReferenceQueue
                                    • - throws IllegalArgumentException
                                    • + sealed
                                    java.lang.reflect
                                      Executable
                                        • added
                                        • + abstract
                                        Field
                                          • added
                                          Method
                                            • - throws IllegalArgumentException
                                            Parameter
                                              • added
                                              • added
                                              • added
                                              Member
                                                • added
                                                java.lang
                                                  Character.UnicodeBlock
                                                    Class
                                                      • added
                                                      Double
                                                        Enum
                                                          • + deprecated
                                                          • + forRemoval
                                                          Float
                                                            Integer
                                                              Long
                                                                Math
                                                                  Object
                                                                    • + forRemoval
                                                                    Runtime
                                                                      • + deprecated
                                                                      • + deprecated
                                                                      • + deprecated
                                                                      • + deprecated
                                                                      • + forRemoval
                                                                      StrictMath
                                                                        System
                                                                          • + deprecated
                                                                          • + forRemoval
                                                                          Thread
                                                                            • + deprecated
                                                                            • + forRemoval
                                                                            Character.UnicodeScript
                                                                              java.math
                                                                                BigDecimal
                                                                                  BigInteger
                                                                                    java.net.spi
                                                                                      java.net
                                                                                        • + sealed
                                                                                        SocketException
                                                                                          java.nio.channels
                                                                                            FileChannel
                                                                                              java.nio.charset
                                                                                                Charset
                                                                                                  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
                                                                                                                  KeyStoreSpi
                                                                                                                    KeyStore
                                                                                                                      java.text
                                                                                                                        DecimalFormatSymbols
                                                                                                                          java.time.chrono
                                                                                                                            IsoChronology
                                                                                                                              JapaneseChronology
                                                                                                                                MinguoChronology
                                                                                                                                  ThaiBuddhistChronology
                                                                                                                                    Chronology
                                                                                                                                      java.time.format
                                                                                                                                        DateTimeFormatterBuilder
                                                                                                                                          DateTimeFormatter
                                                                                                                                            java.time
                                                                                                                                              Duration
                                                                                                                                                • + sealed
                                                                                                                                                ZoneOffset
                                                                                                                                                  java.util.concurrent
                                                                                                                                                    CompletableFuture
                                                                                                                                                      • + final
                                                                                                                                                      Executors
                                                                                                                                                        ForkJoinPool
                                                                                                                                                          ForkJoinTask
                                                                                                                                                            ForkJoinWorkerThread
                                                                                                                                                              FutureTask
                                                                                                                                                                • + final
                                                                                                                                                                ThreadPoolExecutor
                                                                                                                                                                  • + forRemoval
                                                                                                                                                                  • + implements AutoCloseable
                                                                                                                                                                  Future
                                                                                                                                                                    java.util.spi
                                                                                                                                                                      ToolProvider
                                                                                                                                                                        java.util
                                                                                                                                                                          • + sealed
                                                                                                                                                                          HashMap
                                                                                                                                                                            HashSet
                                                                                                                                                                              • + 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
                                                                                                                                                                                                                javax.security.auth
                                                                                                                                                                                                                  Subject
                                                                                                                                                                                                                    • + deprecated
                                                                                                                                                                                                                    • + forRemoval
                                                                                                                                                                                                                    • + deprecated
                                                                                                                                                                                                                    • + forRemoval
                                                                                                                                                                                                                    java.compiler
                                                                                                                                                                                                                      javax.annotation.processing
                                                                                                                                                                                                                        Messager
                                                                                                                                                                                                                          javax.lang.model.element
                                                                                                                                                                                                                            ElementKind
                                                                                                                                                                                                                              ExecutableElement
                                                                                                                                                                                                                                javax.lang.model.util
                                                                                                                                                                                                                                  Elements
                                                                                                                                                                                                                                    javax.lang.model
                                                                                                                                                                                                                                      SourceVersion
                                                                                                                                                                                                                                        javax.tools
                                                                                                                                                                                                                                          ForwardingJavaFileManager
                                                                                                                                                                                                                                            DocumentationTool.Location
                                                                                                                                                                                                                                              JavaFileManager
                                                                                                                                                                                                                                                java.desktop
                                                                                                                                                                                                                                                  java.awt.color
                                                                                                                                                                                                                                                    • + final
                                                                                                                                                                                                                                                    • + final
                                                                                                                                                                                                                                                    • + sealed
                                                                                                                                                                                                                                                    finalize()
                                                                                                                                                                                                                                                    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.image
                                                                                                                                                                                                                                                                          ColorModel
                                                                                                                                                                                                                                                                            finalize()
                                                                                                                                                                                                                                                                            IndexColorModel
                                                                                                                                                                                                                                                                              finalize()
                                                                                                                                                                                                                                                                              java.awt
                                                                                                                                                                                                                                                                                Graphics
                                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                                  • + final
                                                                                                                                                                                                                                                                                  • + sealed
                                                                                                                                                                                                                                                                                  • + final
                                                                                                                                                                                                                                                                                  PrintJob
                                                                                                                                                                                                                                                                                    • + forRemoval
                                                                                                                                                                                                                                                                                    • + final
                                                                                                                                                                                                                                                                                    • + sealed
                                                                                                                                                                                                                                                                                    javax.imageio.spi
                                                                                                                                                                                                                                                                                      ServiceRegistry
                                                                                                                                                                                                                                                                                        • + forRemoval
                                                                                                                                                                                                                                                                                        javax.imageio.stream
                                                                                                                                                                                                                                                                                          FileCacheImageInputStream
                                                                                                                                                                                                                                                                                            • + forRemoval
                                                                                                                                                                                                                                                                                            FileImageInputStream
                                                                                                                                                                                                                                                                                              • + forRemoval
                                                                                                                                                                                                                                                                                              FileImageOutputStream
                                                                                                                                                                                                                                                                                                • + forRemoval
                                                                                                                                                                                                                                                                                                ImageInputStreamImpl
                                                                                                                                                                                                                                                                                                  • + forRemoval
                                                                                                                                                                                                                                                                                                  MemoryCacheImageInputStream
                                                                                                                                                                                                                                                                                                    • + forRemoval
                                                                                                                                                                                                                                                                                                    javax.sound.midi
                                                                                                                                                                                                                                                                                                      • + final
                                                                                                                                                                                                                                                                                                      javax.swing.plaf.basic
                                                                                                                                                                                                                                                                                                        BasicDirectoryModel
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + forRemoval
                                                                                                                                                                                                                                                                                                          • + sealed
                                                                                                                                                                                                                                                                                                          BasicToolBarUI
                                                                                                                                                                                                                                                                                                            • + forRemoval
                                                                                                                                                                                                                                                                                                            javax.swing.text.html
                                                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                                                              • + final
                                                                                                                                                                                                                                                                                                              javax.swing.text
                                                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                                                • + final
                                                                                                                                                                                                                                                                                                                • + sealed
                                                                                                                                                                                                                                                                                                                javax.swing
                                                                                                                                                                                                                                                                                                                  • + sealed
                                                                                                                                                                                                                                                                                                                  • + sealed
                                                                                                                                                                                                                                                                                                                  • + final
                                                                                                                                                                                                                                                                                                                  • + final
                                                                                                                                                                                                                                                                                                                  java.management
                                                                                                                                                                                                                                                                                                                    java.lang.management
                                                                                                                                                                                                                                                                                                                      MemoryMXBean
                                                                                                                                                                                                                                                                                                                        • + deprecated
                                                                                                                                                                                                                                                                                                                        java.net.http
                                                                                                                                                                                                                                                                                                                          java.net.http
                                                                                                                                                                                                                                                                                                                            HttpClient.Builder
                                                                                                                                                                                                                                                                                                                              HttpRequest.Builder
                                                                                                                                                                                                                                                                                                                                java.xml
                                                                                                                                                                                                                                                                                                                                  javax.xml.xpath
                                                                                                                                                                                                                                                                                                                                    XPathFactory

                                                                                                                                                                                                                                                                                                                                      This report is based on simple comparison of all public and protected APIs of the java.* and javax.* packages of JDK builds 20-ea+4-158-open and 17.0.3+7-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.