sample.java
public static void main(String[] args) {
Map<String,Integer> mp = new LinkedHashMap();
mp.put("a1",1);
mp.put("a2",2);
System.out.println(mp.getClass());
for (String s:mp.keySet()) {
System.out.println(s);
}
}
実行結果
class java.util.LinkedHashMap
a1
a2