Skip to content

Instantly share code, notes, and snippets.

@ochim
Created November 2, 2016 07:43
Show Gist options
  • Save ochim/396da882748c7fe112a7fd8327208a35 to your computer and use it in GitHub Desktop.
Save ochim/396da882748c7fe112a7fd8327208a35 to your computer and use it in GitHub Desktop.
[java]Mapクラスのオブジェクトの中身を全て確認するコード ref: http://qiita.com/ochim/items/bfb9f903026a1402c1a1
public static void main(String arg[]) {
Map<String, String> map = new HashMap<>();
map.put("key1", "val1");
map.put("key2", "val2");
for (String key : map.keySet()) {
System.out.println(key + ":" + map.get(key));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment