package com.jihe; import java.util.*; public class Test2 { public static void main(String[] args) { ArrayList<Integer> ls=new ArrayList<Integer>(); for(int i=1;i<=100;i++ ) { ls.add(i); } System.out.println("移除的数字是"+ls.remove(10)); for(int j:ls) { System.out.println(j); } } }