新人小白 ,求大神解决一下。Arraylist集合问题
import java.util.*;public class Add
{public static void main (String[] args){
ArrayList a=new ArrayList();
Clerk c1=new Clerk(12,"万平","s123");
a.add(c1);
int [] x={100,500};
a.addAll(1,x);
for(int i=0;i<a.size();i++){
Clerk temp=(Clerk)a.get(i);//求告这步应该怎么改才对?
System.out.println(temp.name);