A

Admin • 833K Points
Coach

Q. Which method in the Map interface is used to copy all mappings from one map to another?

  • (A) copy()
  • (B) clone()
  • (C) putAll()
  • (D) mergeAll()
  • Correct Answer - Option(C)
  • Views: 23
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin

`putAll()` copies all mappings from the specified map to the current map.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.