Stream API is a new and most useful features introduced in Java 8 which can perform sequential and parallel operations such as filter, map, reduce on Collections. Understand Streams using simple example here.
Java 8 introduced lot of exiting new features and enhancements which are useful for developers . This article covers these features ( functional interfaces, lambda expression, method reference, Stream API, default and static methods in interface and more ) with short and simple examples.
Java 8 introduced a new forEach method for Iterables ( such as List ) as well as for Map.
Lets see an example of looping through List and Map using forEach ...