Skip to content

Commit 48a1047

Browse files
authored
Update README.md
1 parent 0587c1d commit 48a1047

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
# java8
22
Java 8 features
3+
4+
Differences between Java 8 Map() Vs flatMap() :
5+
6+
map() | flatMap() |
7+
--- | --- |
8+
It processes stream of values. | It processes stream of stream of values.
9+
It does only mapping. | It performs mapping as well as flattening.
10+
It’s mapper function produces single value for each input value. | It’s mapper function produces multiple values for each input value.
11+
It is a One-To-One mapping. | It is a One-To-Many mapping.
12+
Data Transformation : From Stream<T> to Stream<R> | Data Transformation : From Stream<Stream<T> to Stream<R>
13+
Use this method when the mapper function is producing a single value for each input value. | Use this method when the mapper function is producing multiple values for each input value.
14+

0 commit comments

Comments
 (0)