62,615
社区成员
发帖
与我相关
我的任务
分享
import java.util.*;
public class demo
{
public static void main(String[]args)
{
ArrayList<xx> liaoguodi = new ArrayList<xx>();
xx x1 = new xx();
xx x2 = new xx();
liaoguodi.add(x1);
liaoguodi.add(x2);
liaoguodi.remove(0);
xx u9 = new xx();
liaoguodi.set(0,u9);
xx [] arr = (xx[])liaoguodi.toArray();
System.out.println( arr.length) ;
}
}
class xx//任意类型
{}