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

  Рет қаралды 210,662

Java Techie

Java Techie

3 жыл бұрын

This tutorial will guide you How & when to use map() and faltMap() method in java8 stream
#javatechie #java8 #Stream
GitHub:
github.com/Java-Techie-jt/java8
Blogs:
/ javatechie
Facebook:
/ 919464521471923
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

Пікірлер: 232
@samarthurs8000
@samarthurs8000 3 жыл бұрын
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...
@KrishnaDhakate
@KrishnaDhakate 3 жыл бұрын
Thanks, man, your explanation is short and sweet without wasting time.
@girmahagos8540
@girmahagos8540 3 жыл бұрын
SIMPLY and PPRECISLY explained!! Big Love for your Time, Effort and Diligences!!
@nitinjirawal
@nitinjirawal Ай бұрын
everywhere people have complex definition. this one not only explained well but with a good example too.
@dineshkumar-lf2vk
@dineshkumar-lf2vk 3 жыл бұрын
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
@nishantkumar3516
@nishantkumar3516 2 жыл бұрын
I was unable to understand flatMap() until this video. Thank you so much Sir, your videos truly helps.
@fc6827
@fc6827 2 жыл бұрын
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!)
@lulu6032
@lulu6032 Жыл бұрын
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!
@arjumansheikh5640
@arjumansheikh5640 2 жыл бұрын
For the first time i clearly understood flatmap(). Thanks a lot.
@subhrajitsatpathy3545
@subhrajitsatpathy3545 3 жыл бұрын
One of the best youtube channel I have come across. Love your explanations.
@abhinavmishra9690
@abhinavmishra9690 Жыл бұрын
All doubts got cleared for differences between map and flatMap operations of stream API. Thanks
@kundankumar-sn3fz
@kundankumar-sn3fz 3 жыл бұрын
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 🙏
@salmanbaig7746
@salmanbaig7746 3 жыл бұрын
Excellent explanation in a very systematic way with good clear example.. Thank you
@srinin4600
@srinin4600 Жыл бұрын
Please rename the word "flattering" to "flattening" . "Flattering" means to praise a lot,- lot of thumbs up for this video is flattering. Flattening is to reduce dimensions that flatMap does. Thanks
@Javatechie
@Javatechie Жыл бұрын
Yes buddy typo
@rishiraj2548
@rishiraj2548 Жыл бұрын
The code example is quite comprehensive and useful. Great thanks!
@neeraj91mathur
@neeraj91mathur 2 жыл бұрын
Very clearly explained, this is what I was looking for. Thanks 👍
@vishwnathmpatil
@vishwnathmpatil 3 жыл бұрын
Great, simple and easy explaining the stream👍🏾
@mohammadshahruk8017
@mohammadshahruk8017 3 жыл бұрын
Every weekend I like to watch ur new videos keep posting
@nateivecode
@nateivecode 2 жыл бұрын
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!
@Javatechie
@Javatechie 2 жыл бұрын
Thanks buddy for the sweet word 👌
@maksymmelnyk8071
@maksymmelnyk8071 3 жыл бұрын
Thanks a lot! 15 minutes and I got it very clear.
@sameer838
@sameer838 2 жыл бұрын
Sir ur explanation is very simple and understanding every time.. Please keep doing it 🙏👏👏
@9851573327
@9851573327 3 жыл бұрын
Great video. Hope to see all other Java8 related videos soon. 🙃😊
@davidl6797
@davidl6797 Ай бұрын
What a clear and practical explanation, thank u sir!
@sramkrishna4004
@sramkrishna4004 Жыл бұрын
i love this good example to illustrate the difference b/w map and flatmap() keep it up bro
@gaurrahul619
@gaurrahul619 5 ай бұрын
straight forward stunning explanation got concept easily.
@VijayKumar-ie9xd
@VijayKumar-ie9xd Жыл бұрын
Provided knowledge with simple example.
@sambhavjain6957
@sambhavjain6957 Жыл бұрын
Thanks for clearing the point
@divinity5250
@divinity5250 Жыл бұрын
Awesome+Simple explanation!! Thanks a ton ❤️
@e.ch.vidyasagarkorada8937
@e.ch.vidyasagarkorada8937 3 жыл бұрын
Thank you java tech guru, helping lot to understand the key concepts Jai hind
@jpssasadara3624
@jpssasadara3624 Жыл бұрын
A clear explanation
@nausheenkhan5896
@nausheenkhan5896 2 жыл бұрын
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 transformation+flattening(flattening is the process of converting multiple lists of lists in stream to a single list by merging the values)
@aeroabrar_31
@aeroabrar_31 10 ай бұрын
No, it follow many-to-one mapping. It converts many collections one single stream
@palashkhatri7820
@palashkhatri7820 2 жыл бұрын
Thank you , Its was really crystal clear explanation .
@itsmainakmukherjee
@itsmainakmukherjee 2 жыл бұрын
You have got a new subscriber. That's all I can say. Great learning for me. 😊👍
@Rithus2020
@Rithus2020 3 жыл бұрын
Thanks for the wonderful Explanation! Clear shot
@awadhtripathi674
@awadhtripathi674 3 жыл бұрын
Really awesome 👍 please create more videos on java 8. Such real time experience.
@tejaskhandare9270
@tejaskhandare9270 2 жыл бұрын
So concise and too the point.... Thanks a lot
@sproutboot
@sproutboot 2 жыл бұрын
Good. I read so many times flatMap is map+flattering, but didnt really understand what flattering is. Thanks
@sonicserenity9498
@sonicserenity9498 2 жыл бұрын
Thank you, sir - really good that you provide code for reference ...
@petroniobonavides3530
@petroniobonavides3530 Жыл бұрын
This si the real TeachingTalent Instructor
@lpnjp
@lpnjp 2 жыл бұрын
Excellent, finally understood. Thanks a TON.
@jitendrapatil3276
@jitendrapatil3276 Жыл бұрын
Thanks for the video. One to One and One to Many explanation was really really great.
@kedarnathanubolu2295
@kedarnathanubolu2295 Жыл бұрын
Simple and clear explanation thank you
@kedarnathanubolu2295
@kedarnathanubolu2295 Жыл бұрын
Am exciting all the 1.8 features in a single video plz this will help us a lot
@Javatechie
@Javatechie Жыл бұрын
Hi buddy it's already there please follow this video kzfaq.info/get/bejne/m7Z6pddmkq2clYE.html
@manideepkumar959
@manideepkumar959 2 жыл бұрын
Thanks u told in very simpler way easily understood 😀
@sepgh2216
@sepgh2216 2 жыл бұрын
Great job. One note, for those of use that our OCD kicks in easily it will not be easy to watch the code comments being 2 tabs behind the rest of the code (6:32)
@Atul_Shegokar
@Atul_Shegokar 3 жыл бұрын
hi sir, hats of to you..... Thank you very much. very nice explanation. I read multiple article about map Vs flatMap, I could not understand but after watching your video I am very clear now. I can answer to interviewer very comfortably after watching this video.
@Javatechie
@Javatechie 3 жыл бұрын
Awesome thanks Atul
@TusharParekhtpar2014
@TusharParekhtpar2014 2 жыл бұрын
very nicely explained . Great work !!
@omprakashgupta2371
@omprakashgupta2371 Жыл бұрын
Nice video
@sagardarade
@sagardarade Жыл бұрын
Simple & Precise.. keep it up
@sagarsri4143
@sagarsri4143 3 жыл бұрын
Superb 👌 explanation ✌️
@PavanKumar-yj8fu
@PavanKumar-yj8fu 2 жыл бұрын
Very good information, thank you very much
@jskr456
@jskr456 3 жыл бұрын
good one basant, wishing you more success with the channel
@car_holic1995
@car_holic1995 8 ай бұрын
bhai best tutorial i have ever seen...love you.
@ranjandas6046
@ranjandas6046 3 жыл бұрын
Always learning new concepts from here. Thank you. I am expecting an example of large project consist of multiple modules and one for authentication and authorisation.
@Javatechie
@Javatechie 3 жыл бұрын
Thanks Ranjan , Please checkout my microservice playlist
@jagadeesht1763
@jagadeesht1763 3 жыл бұрын
Great tutorial bro...👌👌👍👍 Keep posting new tutorial ...😀😀😀😀
@phanimc11211
@phanimc11211 Жыл бұрын
Thanks for making it look so simple.
@prakrutijani4205
@prakrutijani4205 5 ай бұрын
What an explanation sir .. hats off
@navnitkumar7234
@navnitkumar7234 3 жыл бұрын
very good explanation. I understood at one time
@dineshraj9488
@dineshraj9488 Жыл бұрын
Thanks for your wonderful explanation!!
@denosingh
@denosingh 2 жыл бұрын
Helpful, thanks for the video.
@shaikshafa1048
@shaikshafa1048 Жыл бұрын
Thanks sir...this topic is very helpful for interview purpose
@ashishsahu1310
@ashishsahu1310 2 жыл бұрын
Crystal clear explanation. Thanks for such a nice content.
@Javatechie
@Javatechie 2 жыл бұрын
Thanks buddy 😊
@varindersinghrehal5282
@varindersinghrehal5282 2 жыл бұрын
Thank you so much. Best way to explain properly. Jai hind Ji
@kesavuluc9802
@kesavuluc9802 3 жыл бұрын
You are my favorite techie bro!
@hkmehandiratta
@hkmehandiratta Жыл бұрын
Thanks a lot for your efforts and putting this video.
@pushpal.r.1096
@pushpal.r.1096 2 жыл бұрын
Thank you Sir. Nicely explained.
@felipedossantos7246
@felipedossantos7246 2 жыл бұрын
Great content, pal!!!
@ashishgirolkar47
@ashishgirolkar47 Жыл бұрын
GREAT EXPLAINATION ....Thanks SIR
@vik6330
@vik6330 Ай бұрын
Awesome explanation sir, Great❤
@testuser51463
@testuser51463 3 жыл бұрын
Nice and short explanation to the point
@mohammedshabbir1347
@mohammedshabbir1347 2 жыл бұрын
Thanks for the nice explanation.
@krishsuripaka1056
@krishsuripaka1056 2 жыл бұрын
Bayya ...Extraordinary Explanation. I don't have words...
@Javatechie
@Javatechie 2 жыл бұрын
Thanks Krish 😊
@kandilakshmiprasana9776
@kandilakshmiprasana9776 3 жыл бұрын
Way of explanation is very good
@solbonka
@solbonka Жыл бұрын
good explanation! Thank you!
@azharmobeen
@azharmobeen 2 жыл бұрын
Very well explained thanks 👍👍
@MohammedAli-mc9xv
@MohammedAli-mc9xv Жыл бұрын
Thank you sir. Very informative.
@aarthis6216
@aarthis6216 2 жыл бұрын
Excellent explanation 🔥🔥
@rahulpant7795
@rahulpant7795 2 жыл бұрын
beautiful explanation. thankyou.
@rajeebpati9912
@rajeebpati9912 2 жыл бұрын
Well explained. Thank u so much
@ajayantony4412
@ajayantony4412 3 жыл бұрын
Thanks..expecting more tutorials on java 8 + features. I would really appreciate if you would take a competitive programming challenge and show us how to use java 8 + features to solve it.
@Javatechie
@Javatechie 3 жыл бұрын
Sure we will do .
@mohammadikram687
@mohammadikram687 2 жыл бұрын
It would be really interesting to leverage Java 8 to solve cp questions.
@danielcervecero
@danielcervecero 2 жыл бұрын
Great video bro! Really helpful
@k.i.m.5506
@k.i.m.5506 3 жыл бұрын
great job! the first one clearly explained flatMap() . thanks man! btw, one suggestion, please use a runnable project structure when committing code to github. Your code is not well organized which is mismatching the package name and cannot be run out of the box.
@Javatechie
@Javatechie 3 жыл бұрын
Thanks KIM , yes you are correct I should runnable project structure .
@rishikesharora8681
@rishikesharora8681 3 жыл бұрын
Excellent explanation bro.....
@shivamtyagi5486
@shivamtyagi5486 2 жыл бұрын
Well explained!! Very nice video!!!!!
@sharmarahul17
@sharmarahul17 Жыл бұрын
Excellent explanation 👌
@pratishrutipanda6461
@pratishrutipanda6461 3 жыл бұрын
Awesome video sir ji
@prabhuldasds3518
@prabhuldasds3518 2 жыл бұрын
Good tutorial. Thank you.
@jeevi639
@jeevi639 3 жыл бұрын
Great explanation!
@sameerpatere2983
@sameerpatere2983 3 жыл бұрын
Superb tutorial
@ravindusamaranayake3278
@ravindusamaranayake3278 3 жыл бұрын
Nice explanation. thanks!
@vaijnathmagar
@vaijnathmagar 3 ай бұрын
Very good explanation 😊
@suspicious_abies
@suspicious_abies Жыл бұрын
Very clear explanation 🔥👌🏻
@mabastit3468
@mabastit3468 2 жыл бұрын
Thanks .. it's Awesome . but i hava one note : reduce the number of adds , only in this vedio it contains 3 or 4 adds . again thanks for your effort
@indraalapati989
@indraalapati989 3 жыл бұрын
Nice explanation Basanth. I really liked the mapping point. Thank you for your efforts :-)
@deeproy2719
@deeproy2719 2 жыл бұрын
thanks basant short and crisp!
@pitchireddyb646
@pitchireddyb646 3 жыл бұрын
Very clear explanation
@atifansari6424
@atifansari6424 3 жыл бұрын
Thank you sir, You are Awsommmmmmmmm....
@monojkarar1837
@monojkarar1837 3 жыл бұрын
Very nice explanation
@VivekYadav-jq6fv
@VivekYadav-jq6fv 2 жыл бұрын
How come I missed so useful channel.
@venkatasubbareddy.g2283
@venkatasubbareddy.g2283 3 жыл бұрын
U r great bro, 👍
@aminesafi7261
@aminesafi7261 3 жыл бұрын
Nice explanation!
Java 8 Streams | Optional Usage and Best Practices | JavaTechie
22:22
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 9 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 28 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 23 МЛН
Java 8 Streams | map() and reduce()  Example | JavaTechie
18:11
Java Techie
Рет қаралды 96 М.
Stream API in Java : Foundation |  Java 8
55:31
Selenium Express
Рет қаралды 10 М.
Interview Question | Comparable vs Comparator in Java
12:58
Telusko
Рет қаралды 641 М.
How Java 8 Stream API Works ? | Stream API Foundation | EP 2
1:32:04
Selenium Express
Рет қаралды 5 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 800 М.
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 10 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2,1 МЛН
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 814 М.
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 1,4 МЛН
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 8 МЛН