R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the role of the third parameter in `toMap()`?

  • (A) It sorts the map by value
  • (B) It filters nulls
  • (C) It resolves key collisions
  • (D) It disables exceptions
  • Correct Answer - Option(C)
  • Views: 8
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
The third argument is a merge function to handle duplicate keys.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.