代码: public class main { public static void main(String[] p_args){ ArrayList<String> _l_string = new ArrayList<>(); for (int o_a = 0; o_a < 100000; o_a++) { _l_string.add(String.valueOf(o_a)); } c_public_countTime _countTime = new c_public_c…
闲来无事,研究一下Java Collection,首先是ArrayList. 通过三种方式遍历了长度为100000的ArrayList. import java.util.*; public class CollectionTest { public static void main(String[] args) { List<Integer> list = new ArrayList<Integer>(); for (int i = 0 ; i < 100000 ; i++…