Home / Report Question

Q. Which method converts a Stream into a Set?
  • A. collect(Collectors.toSet())
  • B. toSet()
  • C. stream().set()
  • D. set()