A

Admin • 833.24K Points
Coach

Q. Which method is used to iterate over entries in a Map using streams?

  • (A) map()
  • (B) stream()
  • (C) entrySet().stream()
  • (D) keySet().forEach()
  • Correct Answer - Option(C)
  • Views: 27
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin

`entrySet().stream()` allows streaming over Map entries.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.