Java 8 Streams | map () & flatMap() Example | JavaTechie

preview_player
Показать описание
This tutorial will guide you How & when to use map() and faltMap() method in java8 stream

#javatechie #java8 #Stream

GitHub:

Blogs:

Facebook:

guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie

Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community , you are free to use source code from above mentioned GitHub account
Рекомендации по теме
Комментарии
Автор

Thanks for making it look so simple. Key take away: If the parameter in the stream returns a Scalar(eg: customer.getEmail() single email id) then use Map. If the parameter returns a Vector(eg: customer.getPhoneNumbers(), customer.getProductsOrdered() which returns a list) then use FlatMap. Stream of Stream for FlatMap is one more key point to note...

samarthurs
Автор

I was unable to understand flatMap() until this video. Thank you so much Sir, your videos truly helps.

nishantkumar
Автор

Thanks, man, your explanation is short and sweet without wasting time.

KrishnaDhakate
Автор

This is a great tutorial, and it really helped clarify things for me! One minor issue: I'm pretty sure the term is "Data Flattening" not "Data Flattering" (though to be fair, data is not complemented nearly enough!)

fc
Автор

Amazing video: Few Highlights :
1. Use map function when we can map one-to-one mapping, whereas flatmap is used for one to many mapping.
2. map provides mapping for single input, single value whereas flatmap provides mapping single input multiple values
3. flat map performs data is the process of converting multiple lists of lists in stream to a single list by merging the values)

nausheenkhan
Автор

I watched multiple videos on this topic. But you are really very nice in explaining the things deeply with clear and right example. Thanks brother

dineshkumar-lfvk
Автор

There's already SO many comments like this on this video, but I have to commend your ability to simply and clearly explain the topic. Showing an example that can implement both methods and even using the map on something you wanted to flatMap() to illustrate the need for the flatMap() method--such a good illustration.
Sure you said flattering instead of flattening but that is such a miniscule detail. Your comments in your code were fantastic too as it made your verbal explanations even more clear.
Much appreciated for this content, you just got a new subscriber!

nateivecode
Автор

For the first time i clearly understood flatmap(). Thanks a lot.

arjumansheikh
Автор

All doubts got cleared for differences between map and flatMap operations of stream API. Thanks

abhinavmishra
Автор

I have seen lots of videos but didn't understand but after see your video I understand very well thanks bro and God bless you 🙏

kundankumar-snfz
Автор

Sir ur explanation is very simple and understanding every time.. Please keep doing it 🙏👏👏

sameer
Автор

everywhere people have complex definition. this one not only explained well but with a good example too.

nitinjirawal
Автор

SIMPLY and PPRECISLY explained!! Big Love for your Time, Effort and Diligences!!

girmahagos
Автор

Provided knowledge with simple example.

VijayKumar-iexd
Автор

What a clear and practical explanation, thank u sir!

davidl
Автор

You do it very well! Great explainations!! After this, all I understood is that decreasing object levels with flatmap to one level, gives a map!

lulu
Автор

One of the best youtube channel I have come across. Love your explanations.

subhrajitsatpathy
Автор

i love this good example to illustrate the difference b/w map and flatmap() keep it up bro

sramkrishna
Автор

This si the real TeachingTalent Instructor

petroniobonavides
Автор

Every weekend I like to watch ur new videos keep posting

mohammadshahruk