R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of the following returns a read-only List?

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

Explanation by: Ram Sharma
`toUnmodifiableList()` collects elements into an immutable list.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.