Java 8 Streams Tutorial

Java 8 Streams Tutorial

FavoriteLoadingAdd to favorites

Functional programming in Java: tutorial on how to use Java 8 Streams filter, map, sort, reduce and collect functions. Lambda functions explained.

Java468x60

Code on GitHub:
Subscribe:
Thank me on Patreon:

source

By |2019-08-12T21:47:19+00:00August 12th, 2019|Java Video Tutorials|44 Comments

44 Comments

  1. binod kumar singh August 12, 2019 at 9:47 pm - Reply

    Like and subscribed
    That's all i have for you

  2. Ask Sejsbo August 12, 2019 at 9:47 pm - Reply

    a lot of these tutorials are really good, however there is a lot of stuff that if completely unexplained, for example why is a print written like this. "System.out::println"? small things like this that are not explained anywhere makes it really hard to fully understand the subject for someone who is used to "normal" java programming

  3. Aaronb2245 August 12, 2019 at 9:47 pm - Reply

    Thank you!!

  4. Atulya Abhinav Das August 12, 2019 at 9:47 pm - Reply

    can u please add breakpoints in the video description for each example, ur video is super helpful and it will be even more se….Thank you!

  5. Sean Gildea August 12, 2019 at 9:47 pm - Reply

    Great video!! Thanks!!

  6. Anshul Zunke August 12, 2019 at 9:47 pm - Reply

    Nice video. However, i would have liked it more if you had added ParallelStreams in the examples.

  7. Suchitra Malik August 12, 2019 at 9:47 pm - Reply

    Thank you James..keep up good work 🙂

  8. Addy Up August 12, 2019 at 9:47 pm - Reply

    it wouldn't be a java tutorial without an indian name as an example

  9. Frank yourdad August 12, 2019 at 9:47 pm - Reply

    epic

  10. Ayaskant Swain August 12, 2019 at 9:47 pm - Reply

    Wonderful explanation about Java streams. Thank you very much.

  11. Mehrose Nasir August 12, 2019 at 9:47 pm - Reply

    If I’m not wrong findfirst() is a terminal operation, isn’t it?

  12. Siphesihle Sithungu August 12, 2019 at 9:47 pm - Reply

    Simple. Easy to follow. Straight to the point. Basically the most descriptive video I have seen so far on Java streams. Thank you so much.

  13. Arun Raj August 12, 2019 at 9:47 pm - Reply

    6:42 FART

  14. Adam August 12, 2019 at 9:47 pm - Reply

    Great examples. Thanks

  15. (K12_HN) Ninh Quang Hop August 12, 2019 at 9:47 pm - Reply

    Thank you sir

  16. Imortal122 August 12, 2019 at 9:47 pm - Reply

    Whats the needs of using ifPresent ?

  17. Anita Waghmare August 12, 2019 at 9:47 pm - Reply

    Excellent video!

  18. Ismail Aidar August 12, 2019 at 9:47 pm - Reply

    Feels like JavaScript, Like it. Thanks

  19. Gong Jiaji August 12, 2019 at 9:47 pm - Reply

    you contribute 12 marks to my exam

  20. Kotti Ranks August 12, 2019 at 9:47 pm - Reply

    Fantastic, thank you!!!

  21. Venkat B August 12, 2019 at 9:47 pm - Reply

    Excellent!! Clear & Concise . Thanks so much.

  22. The Rohster ;) August 12, 2019 at 9:47 pm - Reply

    Why did you use close in 8, but not in 9?

  23. Marzuwq Muhammad August 12, 2019 at 9:47 pm - Reply

    This was very straight forward and a good introduction into streams for myself someone who developed almost exclusively in Java 7 for over 3 years professionally. Liked and subscribed!

  24. Bhupendra Kumar Yadav August 12, 2019 at 9:47 pm - Reply

    Excellent content and explanation.

  25. nimbostratue August 12, 2019 at 9:47 pm - Reply

    Thank you Joe for this excellent tutorial which is probably better than most of the ones out there.

  26. SHUBHAJIT PRAMANIK August 12, 2019 at 9:47 pm - Reply

    Thanks for sharing the knowledge

  27. M R August 12, 2019 at 9:47 pm - Reply

    Why intellij shows error with this code, says – "Stream doesn't have type parameters" ?

  28. nhan vo August 12, 2019 at 9:47 pm - Reply

    Thank you for your share, it's great videos!

  29. Hazem Sughayar August 12, 2019 at 9:47 pm - Reply

    great video man!!

  30. naveen roshan August 12, 2019 at 9:47 pm - Reply

    Well explained bro , keep up the good work and thank you so much…..

  31. DerSpudi August 12, 2019 at 9:47 pm - Reply

    Awesome! I wasn't comfortable with streams before, but after this video I immediately changed three for loops of my program to streams. Looks so much nicer and is not so tedious to code. Thanks!

  32. André Ramon August 12, 2019 at 9:47 pm - Reply

    Its best to filter first and then sort as it can improve performance on large datasets. Otherwise great tut!

  33. Anh Minh Tran August 12, 2019 at 9:47 pm - Reply

    Awesome tutorial!!!

  34. Kokkonda Abhilash August 12, 2019 at 9:47 pm - Reply

    Excellent

  35. Mohammad Kaiyum August 12, 2019 at 9:47 pm - Reply

    you said we should call filter before sorted.. but you call sorted 10:55 first !!

  36. Deepa Pachoo August 12, 2019 at 9:47 pm - Reply

    Your videos are awesome. Thanks Joe. Also, It would be great if you could group your videos into playlists like Java, Streams, machine learning paths, etc. It’s kind of difficult to get hold of the whole series.

  37. Xenosteven August 12, 2019 at 9:47 pm - Reply

    Why is it that you must close for bands but not bands2? 10:15 / 11:15

  38. Suriya Prakhash Deenadayalan August 12, 2019 at 9:47 pm - Reply

    U nailed it. Short crisp and clear. Appreciate your work👍

  39. Ankana Das August 12, 2019 at 9:47 pm - Reply

    <3 Arijit Singh <3

  40. Tewodros Admassu August 12, 2019 at 9:47 pm - Reply

    Love it, thanks Joe!!!

  41. Prashant August 12, 2019 at 9:47 pm - Reply

    it seems 35 dislike from .NET viewers :).

  42. faiz usmani August 12, 2019 at 9:47 pm - Reply

    Thanks – quite helpful
    Word count for bands.txt would be interesting. I am sure this can be reduced to a better version.
    int count = bands.map(x -> x.split("\s")).map(x -> x.length).reduce(0, (x, y)->x + y );

  43. Davide Nastri August 12, 2019 at 9:47 pm - Reply

    This is so good I cried a bit

  44. S J August 12, 2019 at 9:47 pm - Reply

    It would have been better to use try-with-resources rather than to remember to close a stream if you need to work with stream explicitly.
    try (final Stream<String> bands = Files.lines(Paths.get("bands.txt"))) {
    }

Leave A Comment

*