What is the purpose of map method of stream in Java 8?
The 'map' method is used to map each element to its corresponding result.