Java 8 features with examples

Java Platform, Standard Edition 8 is a major feature release of Java programming language development. Its initial version was released on 18 March 2014. Here is the … Read More

Java 8 Base64 example

Java 8 provides a new feature Base64 to deal with decryption and encryption. Java 8 Base64 class provides three different encoders and decoders to encrypt information at … Read More

Java Parallel Array Sorting

Java 8 provides a new additional method parallelSort() in the Arrays class of java.util package. It is introduced to support the parallel sorting of array elements. The … Read More

Java 8 Optional Class

Java 8 introduced a new public final class Optional in java.util package. It is used to deal with NullPointerException in java application. It provides the methods to … Read More

Java 8 StringJoiner class

Java 8 introduced a new class StringJoiner in the java.util package which provides the facility to join more than one strings with the specified delimiter. We can … Read More

Java 8 collectors class

Collectors is a final class that extends the Object class which provides reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, grouping … Read More

Java 8 forEach example

Java 8 introduced forEach method to iterate over the collections and Streams in Java. It is defined in Iterable and Stream interface. It is a default method … Read More

java 8 stream forEach method example

The java.util.stream is a sequence of elements supporting sequential and parallel aggregate operations.
The Stream.forEach() method works same as of for loop. It iterates through each element … Read More

java 8 stream limit method example

The java.util.stream is a sequence of elements supporting sequential and parallel aggregate operations.
The Stream.limit() method returns a Stream with elements of the source stream.

Java 8

Read More