package cn;
import java.util.*;public class tt {
public static void main(String[] args) {
Collection<Integer> collection =
new ArrayList<Integer>(Arrays.asList(1, 2, 3, 4, 5));
Integer[] moreInts = { 6, 7, 8, 9, 10 };
collection.addAll(Arrays.asList(moreInts));
// Runs significantly faster, but you can't
// construct a Collection this way:
Collections.addAll(collection, 11, 12, 13, 14, 15);
Collections.addAll(collection, moreInts);
// Produces a list "backed by" an array:
List<Integer> list = Arrays.asList(16, 17, 18, 19, 20);
list.set(1, 99); // OK -- modify an element
//list.add(21); // Runtime error because the
// underlying array cannot be resized.
for(Integer c: collection){
System.out.println(c);
}
}
} ///:~
import java.util.*;public class tt {
public static void main(String[] args) {
Collection<Integer> collection =
new ArrayList<Integer>(Arrays.asList(1, 2, 3, 4, 5));
Integer[] moreInts = { 6, 7, 8, 9, 10 };
collection.addAll(Arrays.asList(moreInts));
// Runs significantly faster, but you can't
// construct a Collection this way:
Collections.addAll(collection, 11, 12, 13, 14, 15);
Collections.addAll(collection, moreInts);
// Produces a list "backed by" an array:
List<Integer> list = Arrays.asList(16, 17, 18, 19, 20);
list.set(1, 99); // OK -- modify an element
//list.add(21); // Runtime error because the
// underlying array cannot be resized.
for(Integer c: collection){
System.out.println(c);
}
}
} ///:~
楼主【zzzkkk666】截止到2008-07-12 22:47:05的历史汇总数据(不包括此帖):
发帖的总数量:34 发帖的总分数:827 每贴平均分数:24
回帖的总数量:102 得分贴总数量:12 回帖的得分率:11%
结贴的总数量:33 结贴的总分数:827
无满意结贴数:3 无满意结贴分:70
未结的帖子数:1 未结的总分数:0
结贴的百分比:97.06 % 结分的百分比:100.00%
无满意结贴率:9.09 % 无满意结分率:8.46 %
值得尊敬