Posts

Java 9 New Features

Java9 New Features Public Release : September 21 2017 ========================================================= Features: JShell JPMS(Java Platform Module System)    3. JLink (Java Linker)    4. Http2 Client    5. Process API Updater    6. Private methods in Interfaces    7. Try with Resources Enhancements    8. Immutable Collections List.of() Set.of() map.of() Map.ofEntries()    9. Stream API Enhancements takeWhile() dropWhile() Stream.ofNullable() Stream.iterator()    10. <> Enhancements for anonymous inner classes    11. SafeVarargs Annotations for private methods with generics    12. G1 GC   ===========================================================

Java 8 New Features

Java 8   New  Features: 1. Java Programming Language Lambda Expressions Default Methods & Static methods in Interface Repeating Annotations Type Annotations Method Parameter Reflection Method Reference Improved Type inference. 2. Collections: Stream package Hash Map performance improvement with key collisions. 3. Date-Time Package   4. Nashorn Javascript Engine 5. java.util.* PARALLEL Arrays Unsigned Arithmetic Support 6. New JDBC 4.2 API 7. Java DB 10.10 8. java.util.concurrent ConcurrentHashMap to support aggregate Operations atomic package to support scalable ForkJoinPool to support Common Pool. StampedLock to provide capability-based lock with 3 modes for controlling read/write access. Default and Static methods in interface: Before Java8 it was not possible to add new functionality to the existing interface without forcing all the implementation classes to create an implementation of new methods It was forced to implement new methods to the existi...

Java 22 New Features

Image
 

Java15 New Features

Image
 

Java 13 features

Image
  Java 13 features: Text Blocks – JEP 355 with “”” New Methods in String Class for Text Blocks Switch Expressions Enhancements – JEP 354 Reimplement the Legacy Socket API with NioSocketImpl, is a drop-in replacement for PlainSocketImpl. It uses java.util.concurrent locks rather than synchronized methods.  Switch Expression enhancements with yield FileSystems.newFileSystem() Method Three new methods have been added to the FileSystems class to make it easier to use file system providers, which treats the contents of a file as a file system. newFileSystem(Path) newFileSystem(Path, Map<String, ?>) newFileSystem(Path, Map<String, ?>, ClassLoader)

Java 12 Features

Java 12 Features: Teeing Collectors in Stream API Teeing Collector is the new collector utility introduced in the Streams API. This collector has three arguments – Two collectors and a Bi-function. Java Strings New Methods 4 new methods have been introduced in Java 12 which are: indent (int n) transform (Function f) Optional  describeConstable () String resolveConstantDesc (MethodHandles.Lookup lookup) Pattern Matching for instanceof  Compact Number Formatting Switch Expressions enhancements Java 12 has enhanced Switch expressions for Pattern matching. Introduced in  JEP 325 , as a preview language feature, the new Syntax is L ->. Following are some things to note about Switch Expressions: The new Syntax removes the need for break statement to prevent fallthroughs. Switch Expressions don’t fall through anymore. Furthermore, we can define multiple constants in the same label. default case is now compulsory in Switch Expressions. break i...