Answers for "ow do I insert elements in a map? java"

3

java add to map

HashMap<String, String> map = new HashMap<>();
map.put("key", "value");
Posted by: Guest on January-12-2021
1

java add element to map

map.put(key, Object);
//exemple:
Map<String, String> map = new HashMap<String, String>();
map.put("mykey", "myvalue");
Posted by: Guest on July-05-2020

Code answers related to "ow do I insert elements in a map? java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language