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.
Examples : Input – codeforeach , Output – d ; Input – principles , Output – r. Pseudo Algorithm : 1) Build a map consisting of each character of string with repetition count. i) Loop through the string characters ii) For each character,if the character key is found in the map…
increment the value by 1
This example demostrates how to send query to Google and fetch the results using Java.