「java入門」Collectionの要素を取得するコード
javaコード
public static void findElement(Map<String, Student> map) {
Collection<Student> c = map.values();
Iterator it = c.iterator();
for (; it.hasNext();) {
System.out.println(“要素下記:"it.next());
}
}
Coding Changes the World
javaコード
public static void findElement(Map<String, Student> map) {
Collection<Student> c = map.values();
Iterator it = c.iterator();
for (; it.hasNext();) {
System.out.println(“要素下記:"it.next());
}
}