R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method provides a collector that maps elements and then collects them?

  • (A) Collectors.filtering()
  • (B) Collectors.mapping()
  • (C) Collectors.groupingBy()
  • (D) Collectors.toMap()
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.mapping()` applies a mapping function before collecting with another collector.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.