What's the difference between map() and flatMap() methods in Java 8?

What's the difference between map() and flatMap() methods in Java 8?

More to explore

Based on this image's title: “What's the difference between map() and flatMap() methods in Java 8?