1. Map<String,String> map = new HashMap<>();
    2. map.put("aa","avalue");
    3. map.put("bb","bvalue");
    4. for (String key : map.keySet()) {
    5. System.out.println(key);
    6. }
    7. for (String value : map.values()) {
    8. System.out.println(value);
    9. }
    10. for (Map.Entry<String, String> entry : map.entrySet()) {
    11. System.out.println(entry.getKey()+":"+entry.getValue());
    12. }