R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method collects stream elements into a List?

  • (A) Collectors.toMap()
  • (B) Collectors.joining()
  • (C) Collectors.toList()
  • (D) Collectors.toCollection()
  • Correct Answer - Option(C)
  • Views: 8
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.toList()` collects elements from a stream into a List.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.