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

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 238

  • @samarthurs8000
    @samarthurs8000 3 роки тому +64

    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...

  • @nishantkumar3516
    @nishantkumar3516 2 роки тому +7

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

  • @brindhashankar222
    @brindhashankar222 Місяць тому +1

    For anything I want to learn newly in java, I search for your videos! Awesome explanation. You're doing a great job! Thank you so much sir.

  • @ExploreTechFaith
    @ExploreTechFaith 3 роки тому +16

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

  • @fc6827
    @fc6827 3 роки тому +20

    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!)

  • @dineshkumar-lf2vk
    @dineshkumar-lf2vk 3 роки тому +4

    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

  • @arjumansheikh5640
    @arjumansheikh5640 2 роки тому +1

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

  • @abhinavmishra9690
    @abhinavmishra9690 2 роки тому +1

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

  • @nateivecode
    @nateivecode 2 роки тому +4

    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 👌

  • @nausheenkhan5896
    @nausheenkhan5896 2 роки тому +6

    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 Рік тому +2

      No, it follow many-to-one mapping. It converts many collections one single stream

  • @kundankumar-sn3fz
    @kundankumar-sn3fz 3 роки тому +1

    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 🙏

  • @subhrajitsatpathy3545
    @subhrajitsatpathy3545 3 роки тому +1

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

  • @VivekYadav-jq6fv
    @VivekYadav-jq6fv 2 роки тому +2

    How come I missed so useful channel.

  • @VijayKumar-ie9xd
    @VijayKumar-ie9xd Рік тому +1

    Provided knowledge with simple example.

  • @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)

  • @nitinjirawal
    @nitinjirawal 6 місяців тому +1

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

  • @girmahagos8540
    @girmahagos8540 3 роки тому +1

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

  • @davidl6797
    @davidl6797 7 місяців тому +1

    What a clear and practical explanation, thank u sir!

  • @car_holic1995
    @car_holic1995 Рік тому +1

    bhai best tutorial i have ever seen...love you.

  • @gaurrahul619
    @gaurrahul619 10 місяців тому +1

    straight forward stunning explanation got concept easily.

  • @lulu6032
    @lulu6032 Рік тому +1

    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!

  • @sameer838
    @sameer838 2 роки тому +2

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

  • @petroniobonavides3530
    @petroniobonavides3530 2 роки тому +1

    This si the real TeachingTalent Instructor

  • @krishsuripaka1056
    @krishsuripaka1056 3 роки тому +1

    Bayya ...Extraordinary Explanation. I don't have words...

  • @rishiraj2548
    @rishiraj2548 2 роки тому +1

    The code example is quite comprehensive and useful.
    Great thanks!

  • @mohammadshahruk8017
    @mohammadshahruk8017 4 роки тому +1

    Every weekend I like to watch ur new videos keep posting

  • @Atul_Shegokar
    @Atul_Shegokar 3 роки тому +1

    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.

  • @sagardarade
    @sagardarade Рік тому +1

    Simple & Precise..
    keep it up

  • @ashishsahu1310
    @ashishsahu1310 3 роки тому +2

    Crystal clear explanation. Thanks for such a nice content.

  • @srinin4600
    @srinin4600 2 роки тому +2

    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

  • @palashkhatri7820
    @palashkhatri7820 3 роки тому +2

    Thank you , Its was really crystal clear explanation .

  • @salmanbaig7746
    @salmanbaig7746 3 роки тому +1

    Excellent explanation in a very systematic way with good clear example.. Thank you

  • @tejaskhandare9270
    @tejaskhandare9270 3 роки тому +1

    So concise and too the point.... Thanks a lot

  • @jitendrapatil3276
    @jitendrapatil3276 Рік тому

    Thanks for the video. One to One and One to Many explanation was really really great.

  • @prakrutijani4205
    @prakrutijani4205 10 місяців тому +1

    What an explanation sir .. hats off

  • @e.ch.vidyasagarkorada8937
    @e.ch.vidyasagarkorada8937 3 роки тому +2

    Thank you java tech guru, helping lot to understand the key concepts
    Jai hind

  • @sproutboot
    @sproutboot 2 роки тому +1

    Good. I read so many times flatMap is map+flattering, but didnt really understand what flattering is. Thanks

  • @neeraj91mathur
    @neeraj91mathur 2 роки тому +1

    Very clearly explained, this is what I was looking for. Thanks 👍

  • @mr.lalitdaga
    @mr.lalitdaga 4 роки тому +2

    Great video. Hope to see all other Java8 related videos soon. 🙃😊

  • @shaikshafa1048
    @shaikshafa1048 2 роки тому +1

    Thanks sir...this topic is very helpful for interview purpose

  • @itsmainakmukherjee
    @itsmainakmukherjee 2 роки тому +1

    You have got a new subscriber. That's all I can say. Great learning for me. 😊👍

  • @varindersinghrehal5282
    @varindersinghrehal5282 3 роки тому +1

    Thank you so much. Best way to explain properly. Jai hind Ji

  • @kandilakshmiprasana9776
    @kandilakshmiprasana9776 3 роки тому +1

    Way of explanation is very good

  • @melmax98
    @melmax98 3 роки тому +1

    Thanks a lot!
    15 minutes and I got it very clear.

  • @ashishgirolkar47
    @ashishgirolkar47 2 роки тому +1

    GREAT EXPLAINATION ....Thanks SIR

  • @PavanKumar-yj8fu
    @PavanKumar-yj8fu 3 роки тому +1

    Very good information, thank you very much

  • @mnsravani2161
    @mnsravani2161 Місяць тому +1

    Thank you for your nice explanation

  • @testuser51463
    @testuser51463 3 роки тому +1

    Nice and short explanation to the point

  • @manideepkumar959
    @manideepkumar959 3 роки тому +1

    Thanks u told in very simpler way easily understood 😀

  • @sagarsri4143
    @sagarsri4143 4 роки тому +2

    Superb 👌 explanation ✌️

  • @divinity5250
    @divinity5250 2 роки тому +2

    Awesome+Simple explanation!! Thanks a ton ❤️

  • @suspicious_abies
    @suspicious_abies 2 роки тому +1

    Very clear explanation 🔥👌🏻

  • @ranjandas6046
    @ranjandas6046 4 роки тому +4

    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  4 роки тому

      Thanks Ranjan , Please checkout my microservice playlist

  • @navnitkumar7234
    @navnitkumar7234 3 роки тому +1

    very good explanation. I understood at one time

  • @francksgenlecroyant
    @francksgenlecroyant 3 роки тому +1

    Nice Bro! This is the clearest explanation ever :)

  • @kesavuluc9802
    @kesavuluc9802 3 роки тому +1

    You are my favorite techie bro!

  • @vik6330
    @vik6330 7 місяців тому +1

    Awesome explanation sir, Great❤

  • @azharmobeen
    @azharmobeen 2 роки тому +1

    Very well explained thanks 👍👍

  • @vishwnathmpatil
    @vishwnathmpatil 3 роки тому +1

    Great, simple and easy explaining the stream👍🏾

  • @hkmehandiratta
    @hkmehandiratta 2 роки тому +1

    Thanks a lot for your efforts and putting this video.

  • @vaijnathmagar
    @vaijnathmagar 8 місяців тому +1

    Very good explanation 😊

  • @jskr456
    @jskr456 4 роки тому +1

    good one basant, wishing you more success with the channel

  • @ajayantony4412
    @ajayantony4412 4 роки тому +7

    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  4 роки тому +2

      Sure we will do .

    • @mohammadikram687
      @mohammadikram687 2 роки тому +1

      It would be really interesting to leverage Java 8 to solve cp questions.

  • @sonicserenity9498
    @sonicserenity9498 2 роки тому +1

    Thank you, sir - really good that you provide code for reference ...

  • @awadhtripathi674
    @awadhtripathi674 4 роки тому +1

    Really awesome 👍 please create more videos on java 8. Such real time experience.

  • @TusharParekhtpar2014
    @TusharParekhtpar2014 3 роки тому +1

    very nicely explained . Great work !!

  • @lpnjp
    @lpnjp 2 роки тому +1

    Excellent, finally understood. Thanks a TON.

  • @shivamtyagi5486
    @shivamtyagi5486 3 роки тому +1

    Well explained!! Very nice video!!!!!

  • @kirankumarmothukuri7660
    @kirankumarmothukuri7660 2 роки тому +1

    Thank you brother. You made it easy to understand.

  • @mohammedshabbir1347
    @mohammedshabbir1347 3 роки тому +1

    Thanks for the nice explanation.

  • @Rithus2020
    @Rithus2020 3 роки тому +1

    Thanks for the wonderful Explanation! Clear shot

  • @MohammedAli-mc9xv
    @MohammedAli-mc9xv 2 роки тому +1

    Thank you sir. Very informative.

  • @kedarnathanubolu2295
    @kedarnathanubolu2295 Рік тому +1

    Simple and clear explanation thank you

    • @kedarnathanubolu2295
      @kedarnathanubolu2295 Рік тому +1

      Am exciting all the 1.8 features in a single video plz this will help us a lot

    • @Javatechie
      @Javatechie  Рік тому +1

      Hi buddy it's already there please follow this video
      ua-cam.com/video/ePJrt5-G8eM/v-deo.html

  • @aarthis6216
    @aarthis6216 3 роки тому +1

    Excellent explanation 🔥🔥

  • @pushpal.r.1096
    @pushpal.r.1096 2 роки тому +1

    Thank you Sir. Nicely explained.

  • @denosingh
    @denosingh 3 роки тому +1

    Helpful, thanks for the video.

  • @jagadeesht1763
    @jagadeesht1763 4 роки тому

    Great tutorial bro...👌👌👍👍
    Keep posting new tutorial ...😀😀😀😀

  • @phanimc11211
    @phanimc11211 2 роки тому +1

    Thanks for making it look so simple.

  • @channabasavav1823
    @channabasavav1823 2 роки тому +1

    Thanks Java Techie 🙏🙏

  • @k.i.m.5506
    @k.i.m.5506 3 роки тому +2

    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 .

  • @monojkarar1837
    @monojkarar1837 3 роки тому +1

    Very nice explanation

  • @danielcervecero
    @danielcervecero 3 роки тому +1

    Great video bro! Really helpful

  • @pratishrutipanda6461
    @pratishrutipanda6461 4 роки тому +1

    Awesome video sir ji

  • @rajeebpati9912
    @rajeebpati9912 3 роки тому +1

    Well explained. Thank u so much

  • @rahulpant7795
    @rahulpant7795 3 роки тому +1

    beautiful explanation. thankyou.

  • @mabastit3468
    @mabastit3468 3 роки тому +1

    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

  • @felipedossantos7246
    @felipedossantos7246 2 роки тому +1

    Great content, pal!!!

  • @sameerpatere2983
    @sameerpatere2983 3 роки тому +1

    Superb tutorial

  • @dineshraj9488
    @dineshraj9488 Рік тому

    Thanks for your wonderful explanation!!

  • @madhushankarmj
    @madhushankarmj 3 роки тому +1

    Fan of Java techie

  • @rishikesharora8681
    @rishikesharora8681 3 роки тому +1

    Excellent explanation bro.....

  • @atifansari6424
    @atifansari6424 3 роки тому +1

    Thank you sir, You are Awsommmmmmmmm....

  • @pitchireddyb646
    @pitchireddyb646 4 роки тому +1

    Very clear explanation

  • @jpssasadara3624
    @jpssasadara3624 2 роки тому +1

    A clear explanation

  • @venkateswararaobommidi943
    @venkateswararaobommidi943 3 роки тому +2

    Talk less , code more .. I really appreciate your efforts. Great learning from your videos. Nice explanation.

  • @sambhavjain6957
    @sambhavjain6957 2 роки тому +1

    Thanks for clearing the point

  • @karamjitsinghsehdev3451
    @karamjitsinghsehdev3451 2 роки тому +1

    Nice Explanation.

  • @javamaster4069
    @javamaster4069 2 роки тому +1

    Good concept.

  • @venkatasivamajjari5977
    @venkatasivamajjari5977 3 роки тому +1

    Nice explanation

  • @deeproy2719
    @deeproy2719 3 роки тому +1

    thanks basant
    short and crisp!