import java.util.ArrayList;标签:JAVA,ArrayList,list,a1,add,obj,array,public From: https://www.cnblogs.com/txa2003/p/16953916.html
public class 数组集合输出数据 {
public static void main(String[] args) {
ArrayList a1 =new ArrayList();
a1.add("张三");
a1.add("李四");
a1.add("丁一");
for (Object obj:a1){
System.out.println(obj);
}
}
}