R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector helps accumulate elements into a mutable result container?

  • (A) toList()
  • (B) reducing()
  • (C) toMap()
  • (D) toCollection()
  • Correct Answer - Option(D)
  • Views: 1
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`toCollection()` gives full control over the result container (e.g., LinkedList, TreeSet).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.