R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector creates a partitioned map with boolean keys?

  • (A) Collectors.groupingBy()
  • (B) Collectors.toMap()
  • (C) Collectors.partitioningBy()
  • (D) Collectors.toSet()
  • Correct Answer - Option(C)
  • Views: 3
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.partitioningBy()` divides stream elements into two groups: true and false.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.