Parallel Streams intro || Stream processing Interview Questions and Answers Java 8 | Code Decode

preview_player
Показать описание
Parallel Streams intro || Stream processing Interview Questions and Answers Java 8

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

Java 8 Interview Questions Complete Playlist :

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

___________________________________________________________________________

CodeGym -
___________________________________________________________________________
Discount Code : CODEDECODE

Contact the support team to use the discount code for a 30 % discount on monthly subscriptions

How to access CodeGym :

___________________________________________________________________________

Stream Processing -
___________________________________________________________________________

Collect -
If we want to collect elements of stream after filtering or mapping and add them to the required collection then use collect method.

Count -
If we want to count how many elements are there in collection that satisfy given condition then use collect method.

sorted -
If we want to sort elements inside a stream use this sorted() method.
We can sort based on default natural sorting order
If we want to sort using customized sorting order then use comparator.

Comparator
If we want to sort using customized sorting order then use comparator.

Min Max-
Min(Comparator) will return the minimum value based on the defined comparator
Max(Comparator) will return the maximum value based on the defined comparator

Foreach
forEach() is a method .
All methods that we saw till now returned something, like min max value, sorted collection, etc
This method does not return anything.
Rather This method takes lambda expression as argument and apply that lambda expression to each element present in that stream.

toArray-

of() -
Stream concept is not applicable just for the collections it’s also applicable for “ANY GROUP OF VALUE”.
Even for arrays you can use stream.
Stream . Of() this method can take any group of values and convert them to stream so that multiple stream operations can be applied to it.

Parallel Stream

Java Parallel Streams came into picture after java 1.8.

Its meant to utilize multiple cores of processor.

Till Now our java code has 1 stream of processing where it executes sequentially.

But when you use parallel streams, we divide code into multiple streams that executes parallely , on separate cores and final result is the outcome of individual cores outcomes combined.

Sequential VS Parallel Streams.

-------------------------------------------------------------------------------------------------------------------------------------

Code Decode Playlists

-------------------------------------------------------------------------------------------------------------------------------------
Subscriber and Follow Code Decode

--------------------------------------------------------------------------------------------------------------------------------------

#java8 #parallelStreamJava8 #Java8InterviewQuestion
Рекомендации по теме
Комментарии
Автор

To understand all these advanced concepts, anyone has to go thru tons of materials which involves a lot of effort and time. Thanks a ton for putting all your effort on YouTube. The way you explain things is brilliant and the quality is top-notch. Appreciate it! :)

abhishekrao
Автор

I was total naïve in this topic and voila I have come to right video to learn Streams and crack the video interview . Thankyou for the informative video which made learning process smooth and enjoyable.

nishiagarwal
Автор

Hello madam, I started watching your core java 8 videos. The way you explained the concepts with live examples it's very easy to understand. Thanks for making the videos.

sureshmamidur
Автор

It was the best I've ever watched for java8. Simple and complete...

ZahraHashemiNejad
Автор

I have watched too many videos on streams, but this one is the best explanation.

sairakeshp
Автор

I am very much interested to know more about parallel streaming and their real life use cases. With examples. You are too good binding a vast topic in a properly packaged and detailed manner. Wish to see the next video soon!

manosijroy
Автор

I must say...it's the best I've seen on Java8 streams explanation and usage. Please continue with next part of Parallel Streams.

venkatasaikrishnak
Автор

Hello ma'am, you are doing a great job, the way you describe and give examples with code it becomes so easy to understand, and main thing is everyone here is because of your knowledge, you are not like most of the female creators using face cam video to attract viewers. You're awesome, keep creating content like this.

ShivamKumar-frrh
Автор

Anyone can explain code this much easier from scarch i believe its you. I started watching your videos daily even its watched 😊keep doing ur good work💪

mayilesh
Автор

Ma'am you explained each and every topic in video very simple way and i really enjoyed the learning , all the very best to you, keep doing it. thank you

digitallearning-
Автор

Searching for parallel stream in code decode for more than 5 min and found that it is not uploaded yet 😅 that much addicted. Please post parallel stream i eagerly waiting

mayilesh
Автор

Thank you mam for explaining in simple way. Your videos boost my confidence and clearing the concept.
Hats off mam for taking effort for us.👏🙏

prathameshbodhale.
Автор

Thank you!! so much for a such perfect videos covering even single points. Request you to cover next part as well please.

veena
Автор

Very clear explanation. Appreciate it.

ravindrasiddavatam
Автор

Unfortunately i have a chance to give one like otherwise i do it for one lakh times... i have seen many from this channel very very clear expalination and quality is too good. only i can do that started sharing in my office and friends group in way giving promotion to you...thanks a lot.

kazaasekhar
Автор

I really appreciate your topic on streams and these two videos helped me so much. Thank you for providing detailed explainations.

devisri
Автор

First of All you voice is very beautiful.
"Wow, this Java 8 tutorial is absolutely fantastic! 🚀 Your clear explanations and engaging examples make learning these new features a breeze. I've been struggling to grasp some of the concepts, but your video has really helped clarify things for me. Thank you so much for taking the time to create such high-quality content. Looking forward to diving into more of your tutorials! Keep up the excellent work! 👏"

rajukaranjule
Автор

Nice video on streams with good explanations and examples. I have used parallel streams in my project with batch size. I believe they take the maximum threads (no of cores in CPU-1). But I have one basic doubt, if one core is for one thread then a hexacore CPU can run only 7(8-1) threads at a time. Most importantly they are useful for synchronized processing like Reading a big file in chunks in parallel and produce the same output into another file in the same order. Hope you cover these in the next video of parallel streams.

Vihaanhyperboy
Автор

Your dedication in explaining the features of promotion as well🎉🎉 greatt

thanipattavan
Автор

Great help madam.
Map vs flatmap is very commonly asked java 8 question.
Please include this also. Thanks

shankardayal