Java 8-Java CoreNo Comments

  • Introduction

Java 8 is a revolutionary release of the world’s #1 development platform. It includes a huge upgrade to the Java programming model and a coordinated evolution of the JVM, Java language, and libraries. Java 8 includes features for productivity, ease of use, improved polyglot programming, security and improved performance. Welcome to the latest iteration of the largest, open, standards-based, community-driven platform.

  • New Features

There are dozens of features added to Java 8, the most significant ones are mentioned below −

  1. Lambda expression − Adds functional processing capability to Java.
  2. Method references − Referencing functions by their names instead of invoking them directly. Using functions as parameter.
  3. Default method − Interface to have default method implementation.
  4. New tools − New compiler tools and utilities are added like ‘jdeps’ to figure out dependencies.
  5. Stream API − New stream API to facilitate pipeline processing.
  6. Date Time API − Improved date time API.
  7. Optional − Emphasis on best practices to handle null values properly.
  8. Nashorn, JavaScript Engine − A Java-based engine to execute JavaScript code.

Along with these new featuers, lots of feature enhancements are done under-the-hood, at both compiler and JVM level.

  • Programming Style

Java 8 is expected to change the way programmers code their programs. For a brief comparison between Java 7 and Java 8, let us see a sorting program written with both Java 7 and Java 8 syntaxes.

This program should yield the following output −

Above code, the sortUsingJava8() method uses sort function with a lambda expression as parameter to get the sorting criteria.

To see more detail on another features of Java 8,  flow my series Java 8 tutorials and feel free to ask me if you have any questions !

Be the first to post a comment.

Add a comment