A

Admin • 828.03K Points
Coach

Q. Which method converts a Stream into a Set?

  • (A) collect(Collectors.toSet())
  • (B) toSet()
  • (C) stream().set()
  • (D) set()

Explanation by: Admin
`collect(Collectors.toSet())` collects stream elements into a Set.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.