您的位置:首页 > 编程语言 > Java开发

Java Collection Framework Test

2008-10-23 10:04 316 查看
一、HashSet 
      1、泛型。will type check. use HashSet<object> to assign the item type.      2、HashSet 的容量可以自动增减。      3、add item . 不是先进先出或是后进先出,item 是无序的。不能增加重复item. item 区分大小写。
二、TreeSet       1、add item,throws ClassCastException ,so,it only can add the same type item.      2、item 是排序的。

三、LinkedHashSet        1、add item 是有序的.
            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java