摘要: 1,vector是线程同步的,所以它也是线程安全的,而arraylist是线程异步的,是不安全的。如果不考虑到线程的安全因素,一般用arraylist效率比较高。2,如果集合中的元素的数目大于目前集合数组的长度时,vector增长率为目前数组长度的100%,而arraylist增长率为目前数组... 阅读全文
posted @ 2014-10-13 13:21 Wishmeluck 阅读(248) 评论(0) 推荐(0) 编辑
摘要: ArrayList支持3种遍历方式(01) 第一种,通过迭代器遍历。即通过Iterator去遍历。nteger value = null;Iterator iter = list.iterator();while (iter.hasNext()) { value =(Integer)it... 阅读全文
posted @ 2014-10-13 13:11 Wishmeluck 阅读(120) 评论(0) 推荐(0) 编辑