Could someone tell me how to get or print the String value of a map element? The below code results in "The method values() is undefined for the type String." I also tried .getValue() but the outcome is the same.
Thanks in advance!
Map<Integer, String> mapName = new HashMap<>();
mapName.put(0, "description_0");
mapName.put(1, "description_1");
for (Integer i : mapName.keySet()){
System.out.println(mapName.get(i).values());
}