The map() function perform map functional operation in Java. This means it can transform one type of object to others by applying a function.
For example, if you have a List of String and you want to convert that to a List of Integer, you can use map() to do so.
Just supply a function to convert String to Integer e.g., parseInt() to map() and it will apply that to all elements of List and give you a List of Integer. In other words, the map can convert one object to another.