JDK 18 Arrived- What's new features released in Java 18
JDK 18 was released on March 22, 2022, featuring 9 new platform upgrades that would help developers work more efficiently.
It including UTF-8 by Default, Simple Web Server and Internet-Address Resolution SPI, 2 incubator and 1 preview feature.
It deprecates the Finalization, preparation for their removal in a future release and more details to watch out...
Java 18 release date :
22 March 2021Java 18 Download :
Java 18 JDKJava 18 has below features coming out as part of the JDK 18:
-
JEP 400: UTF-8 by Default
-
JEP 408: Simple Web Server
-
JEP 413: Code Snippets in Java API Documentation
-
JEP 416: Reimplement Core Reflection with Method Handles
-
JEP 417: Vector API (Third Incubator)
-
JEP 418: Internet-Address Resolution SPI
-
JEP 419: Foreign Function & Memory API (Second Incubator)
-
JEP 420: Pattern Matching for switch (Second Preview)
-
JEP 421: Deprecate Finalization for Removal
JEP 408 : UTF-8 by Default
Set UTF-8 as the default charset for Java APIs. Except for terminal I/O, use UTF-8 across the regular Java APIs. As a result of this change, APIs that rely on the default charset will now behave consistently across all implementations, operating systems, locales, and configurations.
The default charset is determined when the Java runtime starts in JDK 17 and before. By making UTF-8 the default charset, there's a chance that programmes won't work properly with data produced when the new default charset isn't specified.Though risk is not new.
Developers are strongly encouraged to check for charset issues by starting the Java runtime with -Dfile.encoding=UTF-8 on their current JDK release (JDK 8-17).
On macOS and many linux distributions use UTF-8 as its default charset for several releases except when configured to use the Posix C locale, the proposal states. While On other operating systems, like Windows users in Asian and other locales upon the user's locale and the default encoding (windows-1252 or windows-31j) there may be significant risk.
JEP 400 : Simple Web Server
Provide an out-of-the-box static HTTP file server with limited functionality and quick setup. There is no CGI or servlet-like capabilities.
Provide a command-line default implementation as well as a tiny API for programmatic creation and customization.
We can use $ jwebserver command to starts the Simple Web Server, which allow few configuration through parameters like -b, -p, -d, -h etc
This tool will be particularly useful in educational contexts for prototyping, ad-hoc coding, and testing only not intended for commercial-grade server.
JEP 413: Code Snippets in Java API Documentation
With addition of a @snippet tag to JavaDoc's Standard Doclet to declare code fragments to appear in the generated documentation, insertion of example source code in API documentation become easier. Also improve IDE support for snippet creation and editing.
By giving API access to source code fragments, you may make it easier to validate them. Although the author is ultimately responsible for correctness, improved javadoc and related tools can make it easier to achieve.
Enable modern styling features like syntax highlighting and automated name-to-declaration linking.
JEP 416: Reimplement Core Reflection with Method Handles
With addition of a @snippet tag to JavaDoc's Standard Doclet, insertion of example source code in API documentation become easier. Also improve IDE support for snippet creation and editing.
By giving API access to source code fragments, you may make it easier to validate them. Although the author is ultimately responsible for correctness, improved javadoc and related tools can make it easier to achieve.
Enable modern styling features like syntax highlighting and automated name-to-declaration linking.
Java 17 : JDK 17 Features
Checkout Java 17 / JDK 17 Features :
-
JEP 415: Context-Specific Deserialization Filters
-
JEP 414: Vector API (Second Incubator)
-
JEP 412: Foreign Function & Memory API (Incubator)
-
JEP 411: Deprecate the Security Manager for Removal
-
JEP 410: Remove the Experimental AOT and JIT Compiler
-
JEP 409: Sealed Classes
-
JEP 407: Remove RMI Activation
-
JEP 406: Pattern Matching for switch (Preview)
-
JEP 403: Strongly Encapsulate JDK Internals
-
JEP 398: Deprecate the Applet API for Removal
-
JEP 391: macOS/AArch64 Port
-
JEP 382: New macOS Rendering Pipeline
-
JEP 356: Enhanced Pseudo-Random Number Generators
-
JEP 306: Restore Always-Strict Floating-Point Semantics
Java 16 : JDK 16 Features
Java 17 is still in progress, so you can take a look at the latest Java version: Java 16 functionality upgrade to get an idea of what will be in JDK 17
The open-source Java 16 (Java SE 16) and Java Development Kit 16 (JDK 16) is released. The feature set has been frozen for the time being. There will be no more JEPs for this release; developers can start looking at JDK 16 now to get a sense of what's coming in JDK 16. Java 16 released on date : 16 March 2021
Some of the new feature highlights of JDK 16 includes concurrent thread-stack processing for garbage collection, support for C++ 14 language features, an "elastic metaspace" capability to more quickly return unused class metadata memory to the OS, procedural upgrades, new APIs and tooling, operating system ports, strongly encapsulating JDK internals by default, and many more..
Download : JDK 16 ReleaseJDK 16 is here, below features are part of jdk 16.
-
JEP 397: Sealed Classes (Second Preview)
-
JEP 396: Strongly Encapsulate JDK Internals by Default
-
JEP 395: Records
-
JEP 394: Pattern Matching for instanceof
-
JEP 393: Foreign-Memory Access API (Third Incubator)
-
JEP 392: Packaging Tool
-
JEP 390: Warnings for Value-Based Classes
-
JEP 389: Foreign Linker API (Incubator)
-
JEP 388: Windows/AArch64 Port
-
JEP 387: Elastic Metaspace
-
386: Alpine Linux Port
-
JEP 376: ZGC: Concurrent Thread-Stack Processing
-
JEP 369: Migrate to GitHub
-
JEP 357: Migrate from Mercurial to Git
-
JEP 347: Enable C++14 Language Features
-
JEP 338: Vector API (Incubator)
Take a look at our Suggested Posts :
Quick glance on earlier Java Versions Features :
Java 15 Features - JDK 15
JDK Enhancement Proposals (JEP) has now been officially released on 15 September 2020, listed below features/enhancements as part of the jdk 15 :
-
JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
-
JEP 360: Sealed Classes (Preview)
-
JEP 371: Hidden Classes
-
JEP 372: Remove the Nashorn JavaScript Engine
-
JEP 374: Disable and Deprecate Biased Locking
-
JEP 375: Pattern Matching for instanceof (Second Preview)
-
JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
-
JEP 378: Text Blocks
-
JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
-
JEP 381: Remove the Solaris and SPARC Ports
-
JEP 383: Foreign-Memory Access API (Second Incubator)
-
JEP 384: Records (Second Preview)
-
JEP 385: Deprecate RMI Activation for Removal
Java 14 Features - JDK 14
JDK Enhancement Proposals (JEP) has targeted JDK 14 release for 17 March 2020 for below features :
-
Pattern Matching for instanceof
-
Non-Volatile Mapped Byte Buffers
-
Helpful NullPointerExceptions
-
Switch Expressions (Standard)
-
Packaging Tool (Incubator)
-
NUMA-Aware Memory Allocation for G1
-
JFR Event Streaming<
-
Records (Preview)
-
Deprecate the Solaris and SPARC Ports
-
Remove the Concurrent Mark Sweep (CMS) Garbage Collector
-
ZGC on macOS
-
ZGC on Windows
-
Deprecate the ParallelScavenge + SerialOld GC Combination
-
Remove the Pack200 Tools and API
-
Text Blocks (Second Preview)
- Foreign-Memory Access API
Java 13 Features - JDK 13
-
Dynamic CDS Archives
-
ZGC: Uncommit Unused Memory
-
Reimplement the Legacy Socket API
-
Switch Expressions (Preview)
-
Text Blocks (Preview)
Java 12 Features
- Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
- Microbenchmark Suite
- Switch Expressions (Preview)
- JVM Constants API
- One AArch64 Port, Not Two
- Default CDS Archives
- Abortable Mixed Collections
- Promptly Return Unused Committed Memory from G1
Java 11 Features
-
181: Nest-Based Access Control
-
309: Dynamic Class-File Constants
-
315: Improve Aarch64 Intrinsics
-
318: Epsilon: A No-Op Garbage Collector
-
320: Remove the Java EE and CORBA Modules
-
321: HTTP Client (Standard)
-
323: Local-Variable Syntax for Lambda Parameters
-
324: Key Agreement with Curve25519 and Curve448
-
327: Unicode 10
-
328: Flight Recorder
-
329: ChaCha20 and Poly1305 Cryptographic Algorithms
-
330: Launch Single-File Source-Code Programs
-
331: Low-Overhead Heap Profiling
-
332: Transport Layer Security (TLS) 1.3
-
333: ZGC: A Scalable Low-Latency Garbage Collector(Experimental)
-
335: Deprecate the Nashorn JavaScript Engine
-
336: Deprecate the Pack200 Tools and API
Java 10 Features
- Local-variable type inference
- Experimental Java-based JIT compiler.This is the integration of the Graal dynamic compiler for the Linux x64 platform
- Application class-data sharing. This allows application classes to be placed in the shared archive to reduce startup and footprint for Java applications
- Time-based release versioning
- Parallel full GC
- Garbage-collector interface
- Additional Unicode language-tag extensions
- Root certificates
- Thread-local handshakes
- Heap allocation on alternative memory devices
- Remove the native-header generation tool - javah
- Consolidate the JDK forest into a single repository
Java 9 Features
- Modularization of the JDK under Project Jigsaw (Java Platform Module System)
-
jshell: The Java Shell (a Java REPL)
- Ahead-of-time compilation
- XML catalogs
- More concurrency updates. It includes a Java implementation of Reactive Streams, including a new Flow class that included the interfaces previously provided by Reactive Streams
- Variable handles: define a standard means to invoke the equivalents of various java.util.concurrent.atomic and sun.misc.Unsafe operations
- jlink: The Java Linker: create a tool that can assemble and optimize a set of modules and their dependencies into a custom run-time image. It effectively allows to produce a fully usable executable including the JVM to run it
- JavaDB was removed from JDK
- HiDPI graphics: automatic scaling and sizing
Java 8 Features
- Language-level support for lambda expressions and default methods (virtual extension methods) which allow the addition of methods to interfaces without breaking existing implementations.
- Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications
- Annotation on Java types
- Unsigned integer arithmetic
- Repeating annotations
- Date and time API
- Statically-linked JNI libraries
- Launch JavaFX applications (direct launching of JavaFX application JARs)
- Remove the permanent generation
Java 7 Features
- JVM support for dynamic languages
- Compressed 64-bit pointers
- Strings in switch
- Automatic resource management in try-statement
- Improved type inference for generic instance creation, aka the diamond operator <>
- Simplified varargs method declaration
- Binary integer literals
- Allowing underscores in numeric literals
- Catching multiple exception types and rethrowing exceptions with improved type checking
- Concurrency utilities
- New file I/O library adding support for multiple file systems
- Timsort is used to sort collections and arrays of objects instead of merge sort
- Library-level support for elliptic curve cryptography algorithms
- An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
- New platform APIs for the graphics features
- Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
- Upstream updates to XML and Unicode
- Java deployment rule sets
Java 6 Features
- Support for older Win9x versions dropped
- Scripting Language Support
- Dramatic performance improvements for the core platform, and Swing.
- Improved Web Service support through JAX-WS.
- JDBC 4.0 support.
- Java Compiler API
- Upgrade of JAXB to version 2.0
- Support for pluggable annotations
- Many GUI improvements, such as integration of SwingWorker in the API, table sorting and filtering, and true Swing double-buffering (eliminating the gray-area effect).
- JVM improvements include: synchronization and compiler performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and application start-up performance.
- Java 6 can be installed to Mac OS X 10.5 (Leopard) running on 64-bit (Core 2 Duo and higher) processor machines.[54] Java 6 is also supported by both 32-bit and 64-bit machines running Mac OS X 10.6
Java 5 Features
- Generic
- Metadata
- Autoboxing/unboxing
- Enumerations
- Varargs
- Enhanced for each loop
- Improved
- Static imports
- Improvements - Semantics of execution for multi-threaded Java programs
- Improvements - Automatic stub generation for RMI objects
- Improvements - Swing: New skinnable look and feel, called synth
- Improvements - The concurrency utilities in package java.util.concurrent
- Improvements - Scanner class for parsing data from various input streams and buffers