R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `Collectors.toMap()` require to function?

  • (A) A value mapper only
  • (B) A key mapper and value mapper
  • (C) A list supplier
  • (D) Only a grouping function
  • Correct Answer - Option(B)
  • Views: 6
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`toMap()` needs both a key and a value mapping function.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.