In this guide we are going to see different examples of Java Stream map method, Java Streams introduced in Java 8.
Stream.map() method is a Stream intermediate operation, an intermediate operation transform a stream into another stream. Java Stream map method produces a new stream after applying a function to each element of the original stream. The new stream could be of different type.
Below example demonstrates how to increase each Employee salary by 10000.
Below example demonstrates how to change each Employee name to upper case.
If we want to filter the elements of stream based on condition we can use Stram.filter(). Below example demonstrates how to list out the employees whose salary greater than 80000.