What is the difference between stream’s map and flatMap?
Map in streams API’s are basically used to convert one type to other and it return non-flat stream object.
For example Stream of String is transformed into a Stream of Integer.
When applied against the array, list, set etc. it return the object of the relevent data set applied to it, confused…?
Let see an example
Streams Interview Question