Java 8 Overview and New Features

Java 8 (Java SE 8) is a major feature release.With Java 8 release, java provided support for

  1. Functional Programming
  2. JavaScript Engine
  3. API for Date and Time
  4. Streaming API, etc..,

New Features in Java 8

Some important features of Java 8 Listed below. We will see more Features in detail in upcoming chapters.

Lambda Expression

Lambda Expressions enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.

Method Reference

Method references provide easy-to-read lambda expressions for methods that already have a name.Referencing function by their name instead of invoking them directly.Using function as parameter.

Default Method

Interface to have default method. Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.

New Tools in Java 8

  1. The jjs command is provided to invoke the Nashorn engine.
  2. The jdeps command-line tool is provided for analyzing class files.
  3. Java Management Extensions (JMX) provide remote access to diagnostic commands.
  4. The jarsigner tool has an option for requesting a signed time stamp from a Time Stamping Authority (TSA).

Stream API

Classes in the new package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations.Performance Improvement for HashMaps with Key Collisions

Date Time API

Improved Date Time API.

JavaScript Engine

Nashorn – Java based engine to execute JavaScript codes

Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java – LongStream Interface
  2. Java 8 Stream Filter and Collect Example
  3. Java – BiConsumer Interface
  4. java.util.function Package
  5. Java – Supplier Interface
  6. Java – IntToDoubleFunction Interface
  7. Java 8 Stream Collectors groupingBy with count and sum Example
  8. Java – Collector Interface
  9. Java – DoubleToIntFunction Interface
  10. Java – Collectors Class
  11. Java – DoublePredicate Interface
  12. Java – IntFunction Interface
  13. Java – IntSupplier Interface
  14. Java – LongConsumer Interface
  15. Java 8 Stream Filter with findAny orElse Example

Be the first to comment

Leave a Reply