0 votes
in JAVA by

 Which of the following is not a valid collector in Java 8?

a) toList()

b) toSet()

c) toMap()

d) toQueue()

1 Answer

0 votes
by

Answer: d) toQueue().

Explanation: Although queues are a common data structure, there is no built-in collector to create a queue from a stream in Java 8.

Related questions

0 votes
asked Apr 1 in Gradle by rajeshsharma
0 votes
asked Apr 26 in JAVA by SakshiSharma
...