sample.java
public static void main(String[] args) {
List<String> li = new ArrayList();
li.add("a1");
System.out.println(li.getClass());
for (String l:li) {
System.out.println(l);
}
実行結果
class java.util.ArrayList
a1