Sail E0 Webinar
Question
Which of these method is used add an element and corresponding key to a map?
Options:
A .  put()
B .  set()
C .  redo()
D .  add()
Answer: Option A


Maps revolve around two basic operations “ get() and put(). to put a value into a map, use put(), specifying the key and the value. To obtain a value, call get() , passing the key as an argument. The value is returned



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers