Menu
Popular Courses
Search
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 Comment/FeedBack

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

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 3.1 : Overview of Finance & Acco Chapter 3 : Finance & Accounts SAIL E0 - GFM 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management SAIL E0 - GFM 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management SAIL E0 - GFM 2024
GPOE / GPA Combined 1 Free CBT Mock Test SAIL E0 2024
CBT Mixed Test 1 GPOE/GPA SAIL E0 2024