Map Vs Flat Map | Top Java 8 Coding Interview Question and Answers | Code Decode | Java 8 features

  Рет қаралды 76,372

Code Decode

Code Decode

Күн бұрын

In this video of map vs flatmap we have covered top java 8 coding interview questions for experienced along with answers i.e Map vs flatmap
Udemy Course of Code Decode on Microservice k8s AWS CICD link:
openinapp.co/udemycourse
Course Description Video :
yt.openinapp.co/dmjvd
In this video of java 8 interview question and answer of code decode we have explained the difference between map and flatmap
map vs flatmap is a very important questions in terms of java 8 interview questions and answers for experienced and freshers
map vs flatmap comes under top java 8 interview questions and answers
we have also explained the internal working of flatmap
How Map works in Java 8
The Stream.map() function performs map functional operation i.e. it takes a Stream and transforms it to another new Stream.
It applies a function on each element of Stream and stores return value into new Stream.
The map operation takes a Function, which is called for each value in the input stream and produces one result value, which is sent to the output stream.
How Flat Map works in java 8
Is the combination of a map and a flat operation
This means you first apply the map function and then flattens the result.
The key difference is the function used by map operation returns a Stream of values or a list of values rather than a single value, that's why we need flattening. When you flat a Stream of Stream, it gets converted into Stream of values.
To understand what flattening a stream consists in, consider a structure like [ [1,2,3],[4,5,6],[7,8,9] ] which has "two levels". It's basically a big List containing three more List. Flattening this means transforming it in a "one level" structure e.g. [ 1,2,3,4,5,6,7,8,9 ] i.e. just one list.
In short,
Before flattening - Stream of List of Integer
After flattening - Stream of Integer
---------------------------------------------------------------------------------------------------------------------------------------------------
Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
Advance Java Interview Questions and Answers : • Advance Java Interview...
Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
Spring Boot Interview Questions and Answers : • Advance Java Interview...
Angular Playlist : • Angular Course Introdu...
GIT : • GIT
-------------------------------------------------------------------------------------------------------------------------------------
Subscriber and Follow Code Decode
Subscriber Code Decode : kzbin.info?...
Linkedin : / codedecodeyoutube
Instagram : / codedecode25
--------------------------------------------------------------------------------------------------------------------------------------
#mapvsflatmap #java8interviewquestions #codedecode

Пікірлер: 81
@lakshmipg6458
@lakshmipg6458 2 жыл бұрын
Hi, Thank you so much for the Java8 videos. This helped a lot to crack my interviews. Also can you please do video on how to resolve memory leak issues in java as it was the most commonly asked question in managerial round.
@saumilvachheta
@saumilvachheta 20 сағат бұрын
Hi, don't add video suggestion boxes appear at the end of the video. Sometimes, it affects the material / code, which is being shown on the screen. It ruins the thing (course material). If you want, you add them with (i) symbol at the top right corner. Thanks.
@GauravSharma-up9gs
@GauravSharma-up9gs 2 жыл бұрын
I thought learning Java 8 will be difficult but I played your playlist & that's it. Thanks for sharing your knowledge with everyone in simplified manner. God Bless :-)
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton Gaurav 🙂👍
@shivamagarwal2327
@shivamagarwal2327 Жыл бұрын
Great and simple explanation of a complex concept. Hats off.
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Shivam 🙂🙂
@PankajKumar-ej5dt
@PankajKumar-ej5dt 2 ай бұрын
Best programming related Channel ever.
@CodeDecode
@CodeDecode Ай бұрын
Thanks 😊👍
@VikasKumar-uk9sk
@VikasKumar-uk9sk Жыл бұрын
Thanks for making Java8 easy for all of us . Awesome explanaition 👍
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Vikas 😊😊
@g.prakashreddy5647
@g.prakashreddy5647 2 жыл бұрын
Superb explanation of java8 concepts, Keep continuing
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks 🙂👍
@RishiRaj-ex9wb
@RishiRaj-ex9wb 2 жыл бұрын
I have been sharing your videos bcoz these are so great! Thanks.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton Rishi 🙂👍👍🙂
@TheShantanu30
@TheShantanu30 2 жыл бұрын
Best explaination ever given. Thanks
@CodeDecode
@CodeDecode 2 жыл бұрын
thanks shantanu
@MrAsgar123
@MrAsgar123 2 жыл бұрын
Thank you so much for your explanation.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Asgar 🙂👍
@sanalsz
@sanalsz 14 күн бұрын
So you are collecting it as a set and thats the reason for getting unique values as result right? Not because you use flatmap. When flatmap is used, we'd get a single list, but with all the values including duplicates?
@7thwik
@7thwik 2 жыл бұрын
You are a precious gem !! I feel more confident now to give interviews.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a lot Satwik 🙂🙂. All the very best for your interviews Man 👍👍keep learning keep growing 🙂🙂
@pankajdogra6796
@pankajdogra6796 Жыл бұрын
Thanks a lot for detailed explaination.
@CodeDecode
@CodeDecode Жыл бұрын
😊😊👍
@dpkpk1573
@dpkpk1573 2 жыл бұрын
Nice example taken for explanation...
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks
@minusmagic5660
@minusmagic5660 2 жыл бұрын
Hello mam. I have 8 months of experience. Superb explanation of all the concepts I have been following your videos and I am more confident in the interviews but recently I faced very difficulty in project questions ( end to end spring Boot application ). I struggled to answer the interviews so can u start a new video series for interview questions on the project.
@CodeDecode
@CodeDecode 2 жыл бұрын
kzbin.info/aero/PLyHJZXNdCXsebq3yfNKKObCx9lh8T1BBi
@4everlove87
@4everlove87 15 күн бұрын
Great explanation
@CodeDecode
@CodeDecode 12 күн бұрын
Thanks
@DarnProud
@DarnProud 2 жыл бұрын
it's really helpful....Thanks
@CodeDecode
@CodeDecode 2 жыл бұрын
You're welcome tushar
@Vithal_Nivargi
@Vithal_Nivargi Жыл бұрын
Thank you 😊it was nice explained
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Vithal 😊👍
@KarthikSekar-rk8ly
@KarthikSekar-rk8ly Ай бұрын
Flight sound in background 🤩
@CodeDecode
@CodeDecode Ай бұрын
Yeah we have an airport near by😊
@AndhrakidZ
@AndhrakidZ 2 жыл бұрын
Thank You ..
@CodeDecode
@CodeDecode 2 жыл бұрын
🙂👍
@VETRI.90
@VETRI.90 2 жыл бұрын
Lovely explanation 👌
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Vetri 🙂👍
@praveenkumarvarkala
@praveenkumarvarkala 2 жыл бұрын
Best explanation.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Praveen 🙂👍
@PANKAJKUMARSINGH673
@PANKAJKUMARSINGH673 Жыл бұрын
💪 Great explained
@CodeDecode
@CodeDecode Жыл бұрын
Thanks pankaj
@rutujagurnule6833
@rutujagurnule6833 2 жыл бұрын
Can you also make vedio on oauth authentication in spring boot ,csrf,sql injection attacks ?
@unemployedcse3514
@unemployedcse3514 3 ай бұрын
awesome ❤
@CodeDecode
@CodeDecode 3 ай бұрын
Thanks
@karthiksundaram544
@karthiksundaram544 Жыл бұрын
Superb demos
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Karthik 🙂👍
@manognajoshik8465
@manognajoshik8465 2 жыл бұрын
Ma'am can u please create a video on Remote method invocation? I have gone through many channels but haven't been successful in understanding it..seeing the way you explain, I am pretty much hopeful you can teach it quite well. Please 🥺
@CodeDecode
@CodeDecode 2 жыл бұрын
🙂 sure we will put this in pipeline then 🙂👍
@villagevibess6602
@villagevibess6602 Жыл бұрын
Nice explanation madam.. can you please do one video about spring boot get the MySQL table data without model clas.
@CodeDecode
@CodeDecode Жыл бұрын
Sure 👍
@maheshgm1251
@maheshgm1251 5 ай бұрын
Super
@CodeDecode
@CodeDecode 5 ай бұрын
Thanks
@siddharthshinde9630
@siddharthshinde9630 2 жыл бұрын
Awesome 😎
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Siddhart 🙂👍
@Chenga-bt6tx
@Chenga-bt6tx 4 ай бұрын
If u explain little bit slowly Then concept will understand. Anyways u did great
@PankajKumar-ej5dt
@PankajKumar-ej5dt 2 ай бұрын
Believe me slowly will confuse you more. Better to explain it as it is like she's doing.
@thesologuy14
@thesologuy14 3 ай бұрын
Why can't we use .distinct() for duplicate value?
@hasitgotanymeaning2562
@hasitgotanymeaning2562 2 жыл бұрын
Hi ma'am, can you pls share all your ppt's or docs ?
@modern_mirror
@modern_mirror 9 ай бұрын
Can you please make a video on @bean in details in spring or spring boot..
@CodeDecode
@CodeDecode 9 ай бұрын
sure we will create it soon
@RishiRaj-ex9wb
@RishiRaj-ex9wb 2 жыл бұрын
Good day.!
@CodeDecode
@CodeDecode 2 жыл бұрын
You too 🙂👍
@manindersingh6371
@manindersingh6371 2 жыл бұрын
I think in this video, speed is little bit fast. Not easy to concentrate on the topic. Before upto this video everything was awesome. It's just an enhancement not a bug
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we will reduce our pace Maninder. Sorry for inconvenience . We will work on our pace 👍🙂
@manojpatil2457
@manojpatil2457 2 жыл бұрын
Can you please cover JPA?
@CodeDecode
@CodeDecode 2 жыл бұрын
sure we will create video on it soon
@welcome2sumit
@welcome2sumit 2 жыл бұрын
Can we apply map and flatmap to Map. Suppose I have Map of Map what will be output by flatmap?
@CodeDecode
@CodeDecode 2 жыл бұрын
You can apply flat map on values of map. If u want , we can share code on github for the same.
@hariprasad2697
@hariprasad2697 2 жыл бұрын
U r faster than JVM can you please explain slowly 😑
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Hari, we will work on that👍🙂
@andytube07
@andytube07 4 ай бұрын
😂😂
@SIVAPD
@SIVAPD Жыл бұрын
wonder how it worked with out constructor ??
@CodeDecode
@CodeDecode Жыл бұрын
Try once Siva. If doesn't work please share your doubt, issue after u tried it yourself. I would be happy to help you Man 👍👍🙂
@Ravikumar-gj6qw
@Ravikumar-gj6qw Жыл бұрын
dont open yaah! WFH is the best to stay safe
@CodeDecode
@CodeDecode Жыл бұрын
😂
@rajashreejayasingh1652
@rajashreejayasingh1652 Жыл бұрын
Why channels with nice content have terrible voices.
@CodeDecode
@CodeDecode Жыл бұрын
Can you please tell us what's wrong with voice ?
@anupBroLogs
@anupBroLogs 2 жыл бұрын
Hi i am technical recruiter. I Wana collaborate if u interested to have live mock java fullstack / backend developer role interview session.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Anup. Pleased connect at codedecodebusiness@gmail.com
What Is Object Class In Java? |  #shorts #kiransir  #interviewquestionsandanswers
0:59
The Kiran Academy - Java By Kiran
Рет қаралды 53 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 71 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 109 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 3,7 МЛН
Java 8 Streams | map () & flatMap() Example | JavaTechie
15:37
Java Techie
Рет қаралды 206 М.
This Topson GRIMSTROKE MID cannot be stopped!
15:35
Topson
Рет қаралды 30 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 71 МЛН