Java 8 Interview Shorts 22 - Can we join 2 streams ? #javainterview

preview_player
Показать описание
In this video we will learn about java streams concat method using what you can join two streams and can get a merged stream.
Рекомендации по теме
Комментарии
Автор

Stream.concat(stream1, stream2).distinct().foreach();

krish
Автор

You look very similar to Dinesh from Silicon Valley series.

Tejbad
Автор

i was asked this question in recent interview

mansoor_
Автор

district() method can be used or we can use groupingBy. But first one is the best choice.

vikashsingh-wfko
Автор

We can use distinct method while doing concatenation

harshadramekar
Автор

using distint() we can remove the duplicate

habibullashaik
Автор

Super short explanation. I usually asking this question to senior developers 😂😂

chiragthesiya
Автор

Concatstream. Stream ().distinct ().for each(System. Out::println());

mrshorts