Java 8 Streams API

  Рет қаралды 155,625

Defog Tech

Defog Tech

Күн бұрын

Пікірлер: 134
@sharanyarai378
@sharanyarai378 6 жыл бұрын
Thanks for video.. is stream are faster than old for loop ? if yes why?
@DefogTech
@DefogTech 6 жыл бұрын
Welcome! No, they aren't faster. They just help make the program smaller, succinct and easier to read/maintain. Theoretically, using parallel stream can be faster than for-loop, but only if the stream has large number of elements and there are lot of filters/transforms involved.
@petmik5022
@petmik5022 6 жыл бұрын
not always, butstreams are used for better read and less boilerplate code and are used for internal commands to do something with values and then reffer them to some another date type etc.
@iitgupta2010
@iitgupta2010 5 жыл бұрын
Even sometimes streams are slower than simple for loop if your data is not huge enough.
@asashish905
@asashish905 4 жыл бұрын
But debugging has got tough now a days. 😒😒
@tiyasha01
@tiyasha01 4 жыл бұрын
@@DefogTech it also reduces memory footsprint for intermediate operations
@boosan_m
@boosan_m 3 жыл бұрын
Let’s start with an example....! This is how this video starts, not even a single second of unnecessary content.. spot on .. exceptional 👏
@matthiasmoser6096
@matthiasmoser6096 3 жыл бұрын
I do not know if this was done on purpose, but there is a mistake on the first piece of code: You want if ( min > numbers[ i ] ) at 0:10 . Otherwise, you would be calculating the maximal value. But this actually shows a useful aspect of Java Streams: less mistakes while writing trivial code.
@m_sharif
@m_sharif Жыл бұрын
Exactly, that's the usefulness of java streams.
@monilpanchal
@monilpanchal 5 жыл бұрын
Amazing introductory video. Adding my two cents to parallel streams: Choosing between stream and parallel stream depends on various important factors and also the prerequisites. 1) Parallel streams internally uses fork-join(divide and conquer technique) to evenly distribute tasks to multiple threads to achieve parallelism. Hence the function/operation(intermediate operation) that is being performed on streams should be STATELESS(parallel friendly) else it will deteriorate the performance than a normal stream. 2) Breaking and merging of stream should be easy. For example an ArrayList is easy to break and merge than a linkedList.
@koleff2541
@koleff2541 4 жыл бұрын
Very helpful! I had 3 hours of university lectures and l didnt learn anything. I come to youtube and learned 100% of everything from the video! Thank you!
@ciccioosys
@ciccioosys 4 жыл бұрын
The best and complete tutorial I've seen about Java Streams
@dbvs007
@dbvs007 2 жыл бұрын
This is the best and crisp video on Streams.. covered so much in short time and your audio is also soothing to listen , Thank you for all your hard-work 🙏🙏🙏
@k9870
@k9870 5 жыл бұрын
Ur videos are beautifully explained,,,u have that gift,not everyone can explain with such clarity,,,,mind blowing tutorials...ND 8 dislikes are from those people's who can't understand if God comes personally to teach them...thanqqq for this again tutorial...
@farhaankazi7134
@farhaankazi7134 4 жыл бұрын
Thanks a lot. You gave lot of information in less time as well as you did not make hurry in explanation and speaking speed. Amazing man. I just surprised that how could manage to impart good chunk of info in less time even you spoke at moderate speed, showed code examples, diagrams with explanation, simply amazing. Other good thing in your video is that you also covered Terminal operation in detail with clarity and simplicity of course here also you did it in less without loss of quality. Most of other tutorial skipped explaining Terminal operation part.
@justinjustin5993
@justinjustin5993 4 жыл бұрын
Superb and clear explanation of multiple important concepts in 15 mins.. Thanks a ton..
@sagarmelmatti
@sagarmelmatti 2 жыл бұрын
I checked ur channel quiet late , but ur all videos are awesome ,easy to understand and explanation is far better than other channel , thanks
@sheoran20
@sheoran20 3 жыл бұрын
Outstanding !!!!! the best video on streams I came across.
@ShivamSingh-me1nb
@ShivamSingh-me1nb 3 жыл бұрын
Best video on stream api so far Thankyou very much
@jagadishpalle4037
@jagadishpalle4037 5 жыл бұрын
I always admire of ur work. You give more info in less time with good pictorial representation. You deserve more subscribers. May be changing channel name helps. Waiting for more content...
@jasagientertainment8432
@jasagientertainment8432 5 жыл бұрын
if ( min > numbers[i] ) the condition has to be min > numbers[i] . otherwise the tutorial is really good.
@rabisankarpodder7839
@rabisankarpodder7839 4 жыл бұрын
It was for maximum number calculation in old way.
@sanijshakya3763
@sanijshakya3763 4 жыл бұрын
@@rabisankarpodder7839 but he is doing min for stream example so the if logic is wrong.
@Elvis_system
@Elvis_system 3 жыл бұрын
min > number[i]
@JSreelakshmi-l2t
@JSreelakshmi-l2t 2 ай бұрын
pls do continue to upload more vedioes like this.. your java concurrancy playlist helped me a lot to understand the multithreading concept.. pls do contine to upload more java indepth vedioes . thank you
@GurmeetSingh-yo4db
@GurmeetSingh-yo4db 4 жыл бұрын
Very nice video to understand streams with examples. I have been following your tutorials they always been amazing with such good content. Real time examples of streams. much appreciated.
@samarthurs8000
@samarthurs8000 6 жыл бұрын
Awesome explanation! The figures @5:05 and @11:28 makes it so clear to understand.
@venkatasubbareddy.g2283
@venkatasubbareddy.g2283 5 жыл бұрын
I'm simply understood the concept now very well. The way of explanation is awesome. Thanks for wonderful diagrammatic explanation to easily remember the concepts. Thank you so much Defog Tech.
@anirudhjadhav9663
@anirudhjadhav9663 3 жыл бұрын
This video is very interesting. Although! The old code to find out the minimum element from the array The "if" condition is wrong. it's < if ( min < numbers[i] ) > the expected should be < if ( min > numbers[i] ) > the code in your video will give you the maximum number.
@SatyamRaj55
@SatyamRaj55 3 жыл бұрын
Very clear explanation, thanks for your effort.
@giventavideoshare
@giventavideoshare 5 жыл бұрын
Defog Tech is a great youtube channel for great explanations for Java Tech related stuff. Thanks.
@athisii_ekhe6167
@athisii_ekhe6167 3 жыл бұрын
One of the best videos about streams. Thanks.
@Hedabal
@Hedabal 4 жыл бұрын
Best Java Streams video. 🙏 Finally Understood stream
@nithin_satheesan
@nithin_satheesan 4 жыл бұрын
Crisp and to the point as always. Keep up the good work! Really appreciate your videos 😊
@sumitpaul3080
@sumitpaul3080 4 жыл бұрын
Honestly speaking, you should make a whole series of Java. Lots of good wishes to you.
@luminoussheep5270
@luminoussheep5270 5 жыл бұрын
Excellent work! Thank you for taking the time to put this video together and for the clear explanation it contains.
@muthusamy1619
@muthusamy1619 2 жыл бұрын
Thanks for the video, small correction find the min number in an older way, the if condition was wrong (if (number[i] < min))
@jameswagstaff1962
@jameswagstaff1962 5 жыл бұрын
Incredibly put together and very in depth! This guy is definitely getting a subscribe from me! Thanks
@shellindebted5328
@shellindebted5328 6 жыл бұрын
Great Tutorial Sir!!i would like to caption it as"JAVA8 Streams API--made easy". Today on teacher's day, i take the privilege to wish you "Happy Teacher's Day".Let your guidance be always with us.Thank you!!
@DefogTech
@DefogTech 6 жыл бұрын
Thank you for the kind words sir! Happy Teacher's Day to you too!
@masum.v
@masum.v 4 жыл бұрын
You explanation is awesome. Keep going, and thank you very much for you good work.
@0312amar
@0312amar 2 жыл бұрын
One word Excellent!
@subramanianchenniappan4059
@subramanianchenniappan4059 2 жыл бұрын
Very clear explanation . Useful for interviews 😊😊. Thanks,🙏🙏🙏
@ishwarchandra5559
@ishwarchandra5559 3 жыл бұрын
Best for revision of java stream api
@chakrapanikulkarni8256
@chakrapanikulkarni8256 5 жыл бұрын
Thanks for the video.. Your tutorials are crisp and clear..
@WondersOfWandering
@WondersOfWandering 5 жыл бұрын
Very well explained. Thank you so much!!!
@gajanansirsat4424
@gajanansirsat4424 3 жыл бұрын
You are the best…awesome explanation with great examples. Thank you, Keep going.👍
@chandrababunaidu739
@chandrababunaidu739 2 жыл бұрын
with above code r u getting min number?...Did you tried above code?
@kiranraghuwanshi1012
@kiranraghuwanshi1012 4 жыл бұрын
thank you so much for this video, got more idea about stream api .
@nick-sx2zn
@nick-sx2zn 3 жыл бұрын
Thanks for this golden content
@sagar1691
@sagar1691 4 жыл бұрын
Very nicely explained
@gnanasekaranebinezar7199
@gnanasekaranebinezar7199 6 жыл бұрын
Awesome Presentation!!! Vivid Explanation about Java 8 Stream!! Good work👏
@DefogTech
@DefogTech 6 жыл бұрын
Thank you!
@warneyfied
@warneyfied 3 жыл бұрын
Great tutorial. Thank you so much!
@rajasundarrajan2066
@rajasundarrajan2066 2 жыл бұрын
excellent video, kudos
@bmnaidu2412
@bmnaidu2412 5 жыл бұрын
Excellent explanation ... Awesome.. Thank you so much.
@javaforengineersYT
@javaforengineersYT 4 жыл бұрын
Great video. Very useful info. Thanks.
@selvakumarm8948
@selvakumarm8948 5 жыл бұрын
Great channel with precise explanation. 👍
@balaji7370
@balaji7370 3 жыл бұрын
Good explanation 🤗
@alpavaidya412
@alpavaidya412 4 жыл бұрын
Ur an excellent teacher...keep it up 😊
@tippabatinisantoshkumar2931
@tippabatinisantoshkumar2931 2 жыл бұрын
Really amazing...
@ahmadfx8962
@ahmadfx8962 2 жыл бұрын
Great, Thank you 😘😘😘😘😘😘😘
@akware977
@akware977 4 жыл бұрын
Hello thanks for wonderful and clear tutorial..worth a every second in the video. Please correct me if I am wrong, As per my understanding in stream API we can use multiple intermediate operation(lazy initialization) and single terminal Operation(eager initialization).
@venkyv9289
@venkyv9289 3 жыл бұрын
Nice explanation
@anuj2307
@anuj2307 4 жыл бұрын
Thanks, good tutorial. Just a suggestion, it would be much more efficient to filter the employee first (isActive) and then sort it.
@rohitumrikar5258
@rohitumrikar5258 5 жыл бұрын
Nice Explanation thanks
@srikothapally9810
@srikothapally9810 4 жыл бұрын
Thank you for the good presentation.
@saravanprathi6956
@saravanprathi6956 4 жыл бұрын
Thanks a ton for this video!!
@vivekmishra5876
@vivekmishra5876 4 жыл бұрын
awesome explaination
@Togrul280
@Togrul280 4 жыл бұрын
This video is amazing !
@harshitshukla7382
@harshitshukla7382 6 жыл бұрын
Thanks for the requestes video! Much appreciated :)
@DefogTech
@DefogTech 6 жыл бұрын
You're welcome!
@yusufsengul69
@yusufsengul69 6 жыл бұрын
Very clear explanation, thanks for putting it together. It seems like C# LINQ, but for Java.
@Erebus2075
@Erebus2075 4 жыл бұрын
this was really good :)
@whythosenames
@whythosenames 4 жыл бұрын
1:25 but System.out is an object, why is it then a *static* method reference?
@vijaykumarreddyt3287
@vijaykumarreddyt3287 2 жыл бұрын
Great video
@hyperborean72
@hyperborean72 4 жыл бұрын
Strangely enough you have a mistake on your first slide. The condition for defining min value is the opposite. Other than that quite informative video - great job.
@dktailor123
@dktailor123 6 жыл бұрын
Thanks for awesome Java 8 stream video plzz add more video if possible
@DefogTech
@DefogTech 6 жыл бұрын
You're welcome! Thank you for the kind words! Will keep adding more, hopefully more frequently
@johncerpa3782
@johncerpa3782 4 жыл бұрын
Great video!
@mohammadajaz2844
@mohammadajaz2844 5 жыл бұрын
Thanks for the Video...!!
@vaib5917
@vaib5917 6 жыл бұрын
Streams do not apply those intermediate operations until the terminal operation is not found. That's the power of streams, they are lazily evaluated.
@DefogTech
@DefogTech 6 жыл бұрын
Agree about the lazy evaluation. Though we hardly ever pass around streams (without terminal operations), unlike Reactive Streams which are meant for that purpose. In official documentation, laziness is more about not evaluating elements which are filtered out in previous filter operation, (eg: sorting need not sort duplicate elements, if distinct() is used before it).
@ChittipoluSA
@ChittipoluSA 4 жыл бұрын
Thanks for videos. Could you please load on class loader concepts
@ArvindVerma-ct7oq
@ArvindVerma-ct7oq 5 жыл бұрын
Awesome !!! thanks a lot
@abhinav9469
@abhinav9469 5 жыл бұрын
Very nice tutorial
@ashvajitchauhan608
@ashvajitchauhan608 5 жыл бұрын
Thanks you so much. Keep it up please
@koeber99
@koeber99 5 жыл бұрын
This is great intro to java streams..... however, how are time/space complexity calculated with Java streams?
@balajee-v
@balajee-v 6 жыл бұрын
Super...plz add more videos about java 8 features.... Advance thanks...
@DefogTech
@DefogTech 6 жыл бұрын
Yes sir, will add more soon!
@shreyassingh6203
@shreyassingh6203 4 жыл бұрын
Having filter and then sort is always better than having sort and then filter. Asymptotically same, but still you know what I mean 11:22 min
@PrateekMehtaABDFAN
@PrateekMehtaABDFAN 2 жыл бұрын
Will the order of intermediate operations matter for stream to optimize them ?
@Gus-px7hd
@Gus-px7hd 5 жыл бұрын
Very nice, thx.
@mrAshwin06
@mrAshwin06 4 жыл бұрын
Thanks mate ! Another excellent video. I have a question. I get confused on when to go for .map() method while working with streams
@pramodcv
@pramodcv 6 жыл бұрын
Too awesome video
@pradeepanbaluchamy8469
@pradeepanbaluchamy8469 6 жыл бұрын
Well explained..thanks
@DefogTech
@DefogTech 6 жыл бұрын
You're welcome!
@er_ma3
@er_ma3 5 жыл бұрын
Great👍
@ankurtripathi9799
@ankurtripathi9799 4 жыл бұрын
cool put some system design question as well.
@UditMishra24
@UditMishra24 5 жыл бұрын
In first example, the if condition is wrong. It should be - if(numbers[i] < min)
@ShekharPachauri
@ShekharPachauri 3 жыл бұрын
I noticed the same 😂
@karankanojiya7672
@karankanojiya7672 2 жыл бұрын
Respect ++ Sir !
@prakhargupta629
@prakhargupta629 5 жыл бұрын
Nailed it!
@nagesh007
@nagesh007 2 жыл бұрын
Awesome
@MuhammadUsama-zf3iu
@MuhammadUsama-zf3iu 3 жыл бұрын
I have a question, suppose we have an array arr = {1, 5 ,10}; i want to check odd and even and return a string through steam API like "1o5o10e", for every odd add o and for every even number add e, How can be possible this, please.
@geektattoomusic1882
@geektattoomusic1882 4 жыл бұрын
About performance: 1 order of magnitude slower stream is.
@InterviewDOT
@InterviewDOT 5 жыл бұрын
Nice presentation :) InterviewDOT
@KCHUDJI
@KCHUDJI 4 жыл бұрын
U explain concept in very much easier way . Do u have any channel on Udemy for course plz let me knw if any..
@DefogTech
@DefogTech 4 жыл бұрын
No Udemy course so far. Will start membership on KZbin soon, and upload courses or exclusive content there. Hope it helps!
@mustafakamalsirajudeen8133
@mustafakamalsirajudeen8133 6 жыл бұрын
Waiting for your Lambda tutorial eagerly. Can you post it this week? :)
@DefogTech
@DefogTech 6 жыл бұрын
Difficult sir, I will try.. definitely on my list though
@raghavasreenivasulu8072
@raghavasreenivasulu8072 3 жыл бұрын
finding min value condition is wrong (replace "for (int i = 1; i < numbers.length; i++) { if(min>numbers[i]) { min=numbers[i]; } }")
@rock5616
@rock5616 5 жыл бұрын
I have a List of Java Objects, using Stream I'm trying to get a match of an object. If present then i wanna update it, else i wanna add a new Java Object into the existing List. Is there any simpler way of doing it?
@khakr01
@khakr01 5 жыл бұрын
Great videos. Request to increase the font size in the presentation. The contents are not clearly visible on mobile devices.
@DefogTech
@DefogTech 5 жыл бұрын
sure, will do.. thanks for pointing out!
@shrenikpatodi4854
@shrenikpatodi4854 4 жыл бұрын
great
@AyushSharma-ux4fk
@AyushSharma-ux4fk 3 жыл бұрын
Hi, Can you please share the slides as well?
@venkatb8317
@venkatb8317 4 жыл бұрын
Hi IntStream.range(1, 11),i want to take reverse IntStream.range(11, 2) how can we do Thanks
@felipemello8674
@felipemello8674 Жыл бұрын
FIY: the logic for the first example "The old way" is not quite right it's finding the max instead of min the operator should be ">" instead of "
@codingwithjava7297
@codingwithjava7297 5 жыл бұрын
Thank you sir
@dhiabouacida9155
@dhiabouacida9155 4 жыл бұрын
thank you
Functional Interfaces in Java 8
9:32
Defog Tech
Рет қаралды 83 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Circuit Breaker Pattern - Fault Tolerant Microservices
12:19
Defog Tech
Рет қаралды 191 М.
How HashMap works in Java? With Animation!! whats new in java8 tutorial
15:29
Ranjith ramachandran
Рет қаралды 1 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 729 М.
Java Streams Tutorial | 2020
19:13
Amigoscode
Рет қаралды 267 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 908 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 789 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,3 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН