A

Admin • 802.91K Points
Coach

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

  • (A) toList()
  • (B) toSet()
  • (C) toMap()
  • (D) toQueue()
  • Correct Answer - Option(D)
  • Views: 4
  • Filed under category Java
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.