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

50% LikesVS
50% Dislikes

12 thoughts on “Streams Interview Question”

  1. These are in fact fantastic ideas in regarding blogging. You have touched some fastidious factors here. Any way keep up wrinting. Cthrine Osborn Adeline

  2. When some one searches for his necessary thing, so he/she desires to be available that in detail, therefore that thing is maintained over here. Gabriel Saul Graves

  3. I have been reading out many of your articles and i must say pretty clever stuff. I will make sure to bookmark your blog. Theadora Heinrick Belcher

  4. Keep up the wonderful work, I read few content on this site and I think that your site is rattling interesting and has got sets of great info . Nananne Rutger Dario

  5. Good website! I truly love how it is easy on my eyes and the data are well written. I am wondering how I might be notified when a new post has been made. I have subscribed to your feed which must do the trick! Have a nice day! Rozele Ty Touber

Leave a Reply

Your email address will not be published. Required fields are marked *