0 votes
in JAVA by

Which of the following is true about the Stream.concat() method in Java 8?

a) It creates a new stream that is the concatenation of two streams.

b) It creates a new stream that is the intersection of two streams.

c) It creates a new stream that is the union of two streams.

d) It creates a new stream that is the difference of two streams.

1 Answer

0 votes
by
Answer: a) It creates a new stream that is the concatenation of two streams.

Explanation: The Stream.concat() method creates a new stream that contains all the elements of two given streams, in the order they are encountered.

Related questions

0 votes
asked May 2 in JAVA by Robin
0 votes
asked Apr 26 in JAVA by SakshiSharma
...