Map<String,String> map = new HashMap<>();
map.put("aa","avalue");
map.put("bb","bvalue");
for (String key : map.keySet()) {
System.out.println(key);
}
for (String value : map.values()) {
System.out.println(value);
}
for (Map.Entry<String, String> entry : map.entrySet()) {
System.out.println(entry.getKey()+":"+entry.getValue());
}