Introduction to Java8 Features

Introduction

In this blog we discuss Java8 features. This complete version may be released within July-2014, but you can take benefit of its feature by downloading it's Pre-release version.

Why we need of Java8  

Java 8 is approaching and even though the deadline has been pushed back, we can be quite confident that it will bring lambdas when it is finally out. As stated above, we did already cover the subject a bit some time ago, however, lambdas alone are not the only game-changer in Java 8.

Suppose Java 8 is out and has lambdas. Now you would like to start using lambdas and the most obvious use case for that is to apply a lambda to every element of a collection.

What's New in Java 1.8

There are many new features are added in Java8. I describe some important feature below.

Describe some of them

1. Lambda Expression

It is the most important feature added by java8.

Java8 add lambda expressions (closures) and supporting features, including method references, enhanced type inference, and virtual extension methods, to the Java programming language and platform.

Why Lambda

We all know Java Language is an object oriented programming language and we are using it with passion. In Java you need to implement that by yourself or have to use some utility classes from third party libraries. This might be verbose and creepy.  But sometimes we want to pass some code to a method instead of an

object. To make this happen we are implementing Callbacks. This leads us to develop verbose code and it feels not like to be well supported by Java. An additional use case is dealing with groups of data. Sometimes it is necessary to execute a specific algorithm to a group of data. Functional programming languages

support things like "forAllDo". In Java you need to implement that by yourself or have to use some utility classes from third party libraries. This might be verbose and creepy.

2. New Date & Time API

The built-in date and time handling in Java is not always very convenient to use. So in Java 8 a new built-in API has been made which is a lot more nice to use.

3. Provide stronger Password-Based-Encryption (PBE) algorithm

In very short, today Java PBE algorithms from the SunJCE provider only cover DESede, and RC2 (40-bit) with SHA1. In java 8, PBE algorithm implementations with stronger cipher and message digest algorithms, such as AES cipher and SHA-2 family message digests, as well as those specified by PKCS#12 are added.

In this blog, I wrote only some features of Java8, but in future I try to write a brief article on that. The purpose of this blog to provide you the information of new release version of Java. 

Ebook Download
View all
Learn
View all