首页 > 其他 > 详细

关于 HashTable

时间:2017-07-28 17:02:31      阅读:236      评论:0      收藏:0      [点我收藏+]

hashTable 的一些认识:

  1.   底层使用散列表,存贮键值对,键值非null
  2.        使用synchronize 保证线程安全

 

构造函数

  /**
     * Constructs a new, empty hashtable with a default initial capacity (11)
     * and load factor (0.75).
     */
    public Hashtable() { 
        this(11, 0.75f);
    }

/**
* Constructs a new, empty hashtable with the specified initial capacity
* and default load factor (0.75).
*
* @param initialCapacity the initial capacity of the hashtable.
* @exception IllegalArgumentException if the initial capacity is less
* than zero.
*/
public Hashtable(int initialCapacity) {
this(initialCapacity, 0.75f);
}
 

 

关于 HashTable

原文:http://www.cnblogs.com/romanjoy/p/7251203.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!