package 练习1到100; import java.util.*; public class Test { public static void main(String[] args) { List <Integer> ls=new ArrayList<Integer>(); for(int i=1;i<=100;i++) { ls.add(i); } ls.remove(10); for(int k:ls) { System.out.print(k+" "); } } }
运行结果
package 练习1到100; import java.util.*; public class Test { public static void main(String[] args) { List <Integer> ls=new ArrayList<Integer>(); for(int i=1;i<=100;i++) { ls.add(i); } ls.remove(10); for(int k:ls) { System.out.print(k+" "); } } }
运行结果