for
while
예:
Iterator it = c.iterator(); while(it.hasNext()) { Object obj = it.next(); System.out.println(obj); }
다음으로 대체 가능:
for (Object obj : c) { System.out.println(obj); }