Mapping the elements of a stream is an intermediate operation that's used for transforming these elements into a new version of them by applying the given function to each element and accumulating the results in a new Stream (for example, transforming a Stream<String> into a Stream<Integer>, or transforming a Stream<String> into another Stream<String>, and so on).