I just met your youtube channel while searching for something regarding spring security but after that, I watched some of your other videos as well. They are definitely awesome. Thanks for your work.
This video complements what I was reading about streams, now is time to practice. Congratulations on this, you made so simple the example that you can save hours of reading for some people.
Your style of instruction is truly refreshing. Thank you very much for putting this together. It's fun seeing someone do something that comes naturally to them -- something they're passionate about. That's the vibe I get while watching this and learning from you. I'm definitely going to check out your courses.
thank you so much for the brilliant tutorial. may i ask....., are you typing the shortcuts yourself or it is IntelliJ IDEA doing this. I am writing them down by the way for ease of reference. thank you for the effort you put into these tutorials.
using if statements to make decisions are fine if its a truly binary decision, like if a function is passed a Boolean you can use an if statement because that Boolean value can only ever be one of the other. The functionality is predictable and expandable. However if you are using if statements to make decisions that are more complex all of a sudden you have code that is much less maintainable and prone to errors with any future modifications to the code or requirements of said code. Defining decisions through dynamic dispatch is the proper way of making decisions nowadays even if it is slower because it allows the code to be robust across time.
4:19 - doesn't appear to be free anymore, but then again, I'm a few years late watching the video :D Thanks for the content nonetheless! I will also check your website and courses for sure!
Hi Nelson, thanks for this. Can you please explain how to get images into your comments? Like // Imperative approach ❌ and // Declarative approach ✅ ? My IDE does not show them right like the Github Webpage does. But in your video your IntelliJ did ?!
Thank you for this amazing video on Streams in Java. I would like to know your learning approach to new concepts. How do you learn about all these concepts? What's the secret recipe?
I see this all over the place in Java world but, why not splitting those chains in methods with proper names to improve readability? I think that would make Martin Fowler happy 😄 Thanks for the great explanation!
Hello Neloson thanks for your interesting and well explained concepts. please would like to know how to come out with printing only one property of the person after sorting.
I got plenty of review comments on streams to not to use them on production code unless ur doing parallel and non-blocking operations. So do u use in production code? If yes what could be scenario u used? By the way thumps up to ur video.
I too got the same comments stating that for a short/small collection, classic for each block has more advantage over streams on the basis of processing power & space used. Streams takes up more time & could only be beneficial for huge & complex collection
Thank you! But what about performance? What if there is a large list of T that I want to make different calculations and groupings on? In "normal" code I would iterate the list once and do all the stuff with each element. How would that look like with Java streams if I do not want to iterate the list more than once? E.g. imagine a list of people. I want to create a Map that maps from e.g. the city to a List of People. I also want to have Lists for each gender. Would that mean I have to have 3 streams, each resulting in one of the containers? And what about performance? Thanks in advance!
Hey Colja, I do not think you need three different streams. You can run filter more than once in one stream. All you need to do is to change the predicate on each filter to match your criteria. For that matter, you will Iterate the list only once. I do not know much, but that's all I can say about your question.
It'd be great to include explanation WHY not only how. Imperative > Declarative does not say anything to anybody. It is hardly shorter codewise then forE way. Point of streams is that the operations can be done in parallel with drawback that setting up stream takes some time. Therefore setting up stream for huge list is worth it because of parallel nature of operation, while this couple item long list you are probably just wasting time on typing I believe?
I just met your youtube channel while searching for something regarding spring security but after that, I watched some of your other videos as well. They are definitely awesome. Thanks for your work.
This video complements what I was reading about streams, now is time to practice. Congratulations on this, you made so simple the example that you can save hours of reading for some people.
This is the best explanation I've ever heard. You have teaching talent man. Thank you.
Your style of instruction is truly refreshing. Thank you very much for putting this together. It's fun seeing someone do something that comes naturally to them -- something they're passionate about. That's the vibe I get while watching this and learning from you. I'm definitely going to check out your courses.
thank you for your work, Nelson. really appreciate it.
I watch this so many times, thank you Nelson.
so many times? sounds like Nelson awfully explained streams and you have to watch again and again to understand =) i'm joking. Nelson, great job!
@@ЮрийАндрейцев-й1з No I just keep forgetting it 🙃
I'm glad your tutorials improved over the years. At least for the Spring Boot tutorial. Because this was rough.
I’m really happy to watch this video. I understood ‘streams’ perfectly that made me annoying. thank u
Wow, thank you very much. You explain so well and easy to understand. Greetings from Germany 👍🏼
It's 2020 and I still write code like this. FeelsBadMan
Extremely helpful. Stream APIs are so powerful, thank you for breaking this down!
Easy to understand and great explanation, thank you!
You are welcome :)
thank you so much for the brilliant tutorial. may i ask....., are you typing the shortcuts yourself or it is IntelliJ IDEA doing this. I am writing them down by the way for ease of reference. thank you for the effort you put into these tutorials.
Thank you Nelson, always helping the community!
Definitely the best video about streams on TH-cam.
I was looking for a good video explaining/showing some methods in #stream(), and this was just awesome. 10/10 good job!
Nice explanation. But there's nothing wrong with using if ( multiple conditions ) it's actually faster in most cases
using if statements to make decisions are fine if its a truly binary decision, like if a function is passed a Boolean you can use an if statement because that Boolean value can only ever be one of the other. The functionality is predictable and expandable. However if you are using if statements to make decisions that are more complex all of a sudden you have code that is much less maintainable and prone to errors with any future modifications to the code or requirements of said code. Defining decisions through dynamic dispatch is the proper way of making decisions nowadays even if it is slower because it allows the code to be robust across time.
I think with the getAge and getGender in the sort expression, you need to flip getAge and getGender, i.e, do sort by gender first, then by age.
Explained very simply and cleared doubts. Thank you so much Amigoscode :)
Thank you so much for your tutorial. It help me reduce a lot of code line from doing imperative approach.
Thanks Nelson, I'm appreciate this vids, because when I finished my formation course just learn the base.
Articulate, informative, and succinct - WELL DONE and THANK YOU!
Excellent video, stream really are insane! Your explanation was mighty understandable. Valeu amigo
Thanks man! Your content is AWESOME! Cheers! :)
Besides this being a great tutorial, for the first time ever my non-american name is used in an example :')
Thank you
You are good at teaching
I'm Latinoamerican and could say that Great video man, it's awesome!!
the way you explained is clear. good luck
Thank you
This is very very wonderful! Thanks a lot! 👏
This is the best explanation that i have ever had. thank you a lot guy for this beautifull job.
4:19 - doesn't appear to be free anymore, but then again, I'm a few years late watching the video :D Thanks for the content nonetheless! I will also check your website and courses for sure!
It's was amazing. I love so much yours videos.
Followed you from your FCC video on Spring. Thank you for such an informative session! Subbed
Best website for learn coding
Thank you Nelson for excellent expalnation.
Hi Nelson, thanks for this. Can you please explain how to get images into your comments? Like // Imperative approach ❌ and // Declarative approach ✅ ? My IDE does not show them right like the Github Webpage does. But in your video your IntelliJ did ?!
I was wondering why the output of sorted didn't change after you added thenComparing(Person::getGender()) to the method at 9:00 ?
for thenComparing it should do changes if we have two persons or more with same ages so females will appear first
@@ImAmericanGangsta yeah it was a bad example. He should have sorted by name instead
Thank You, Nelson. Your videos are very helpful to me.
Hey bro, grettings from Johannesburg. Good work, man!
Thank you for this amazing explanation brother! 😄🙌🏾
Thank you! Very very helpful! 💛
Thank you for this amazing video on Streams in Java. I would like to know your learning approach to new concepts. How do you learn about all these concepts? What's the secret recipe?
Buy a book and study.. There is no magic recipe for building concepts.. Free Videos have limitations
Thanks, Nelson
you are a wonderful teacher.
You can do exactly this kind of thing in JavaScript and Python etc so simply, without the excessive syntax that Java needs.
That's fine.. as long as it gets done
Nelson, this is great stuff! Thank you.
Man you inspire me ...keep them coming
I will
You have my thanks, you are doing this very well.
very useful video and simply explained. Thank you so much bro!!
in classical java fashion, complexity gets added left and right
Thanks dude. You just saved me some time :D
Thank you, Helped me a lot 😃
I see this all over the place in Java world but, why not splitting those chains in methods with proper names to improve readability? I think that would make Martin Fowler happy 😄
Thanks for the great explanation!
Please, make a video on Map vs FlatMap. Thank you!
Thank you Bro ! Finally i learned streams in Java
ASK Brother, do you give personal training too?
Excellent class. Thank you!
Thanks for the tutorial, it is concise and well structured. What about the performance of this method compared to the imperative approach?
Its tuned for performance too
Hello Neloson thanks for your interesting and well explained concepts. please would like to know how to come out with printing only one property of the person after sorting.
Amazing video Bro!
Great explanation! Thank you so much!
Thanks Nelson.
Just learning Java for my job and I work with Collections/Lists a lot so this is super helpful.
✌
This was very infomative! I followed along with my own custom made class and I learned a ton! Thanks a million!
Seriously well explained!!
Thank you
Hi, You really explain so well. Really appreciate it. Thank you
Hi @amigoscode, Can you tell me how I can trim strings in the list which are in Ticket class for example, and sort them in ASC order?
I got plenty of review comments on streams to not to use them on production code unless ur doing parallel and non-blocking operations. So do u use in production code? If yes what could be scenario u used? By the way thumps up to ur video.
ahaha something is wrong with you team mates then lol we use streams all over the place. I have only seem once or twice people using parallel streams.
I too got the same comments stating that for a short/small collection, classic for each block has more advantage over streams on the basis of processing power & space used.
Streams takes up more time & could only be beneficial for huge & complex collection
Great content, well structure and quality content. Keep posting :)
Eres un crack!! Thanks and greetings from Argentina🇦🇷
Thanks mate for the tutorial...
Amazing video, can't wait to take the course
Thank you! Very clear, very understandable, very comprehendly
Thanks
What a masterclass. Thank you Nelson
Thank you so much bro, keep it up :)
Woow, thank u so much for this Amazing video
quite clear and understandable
Appreciate simple and structured explanation. Thank you !
thank you! very insightful
Very well explained, good tutorial, thank you
You welcome
best video for java streams
Many Thanks Dear Nelson
Great job Amigo.
Grande Nelson!
Thank you! But what about performance? What if there is a large list of T that I want to make different calculations and groupings on? In "normal" code I would iterate the list once and do all the stuff with each element. How would that look like with Java streams if I do not want to iterate the list more than once? E.g. imagine a list of people. I want to create a Map that maps from e.g. the city to a List of People. I also want to have Lists for each gender. Would that mean I have to have 3 streams, each resulting in one of the containers? And what about performance? Thanks in advance!
Hey Colja, I do not think you need three different streams. You can run filter more than once in one stream. All you need to do is to change the predicate on each filter to match your criteria. For that matter, you will Iterate the list only once. I do not know much, but that's all I can say about your question.
Great tutorial ! I will do the course for sure.
Thanks buddy
What is the shortcut for extracting a variable?
Thank you.
It'd be great to include explanation WHY not only how. Imperative > Declarative does not say anything to anybody. It is hardly shorter codewise then forE way. Point of streams is that the operations can be done in parallel with drawback that setting up stream takes some time. Therefore setting up stream for huge list is worth it because of parallel nature of operation, while this couple item long list you are probably just wasting time on typing I believe?
OMGGG DUDE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> AWESOME
awesome bro thnks ! we want more
thanks amigo, very well explained
That was good man...thanks.
Great video!
Although streams have greatly reduced code lines what are its actual advantages with respect to processing time & speed & space consumption ?
as far as i know, they are much better when working with large amount of data.
They can be 5x slower.
That's intelliJ yeah? How did you create the list variable with what seemed like pressing 1 button? Also changing the lambda to a method reference?
Check my course on IntelliJ on TH-cam or my amigoscode.com/courses
nice explained, but you must agree, that "thenComparing()" only makes sense, if the first comperator produces any doublettes, dont you?
thank you for your work! so cool and understandably
hello bro, it says page not found after clicking the link on gmail after registering on your free course!!
Nelson thanks for the lesson! By the way where are you from?
You welcome. 🇬🇧
The best, brother
Nicely explained. Nice work!
Thanks
Like your lessons, keep going 👍