HashMap load factor ?

Hi,

HashMap has an constructor to define the load factor.......

HashMap(int initialCapacity)

{

}

//Constructs an empty HashMap with the specified initial capacity and thedefault load factor (0.75).

Initial capasity is the size of hashmap..

what it means the defalt load factor..?

- jaban

[346 byte] By [gw@balaa] at [2007-10-1 0:43:08]
# 1
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased.Dixit http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html
TimTheEnchantora at 2007-7-8 0:57:16 > top of Java-index,Security,Event Handling...
# 2
how full the hash table is allowed to get before ?
gw@balaa at 2007-7-8 0:57:16 > top of Java-index,Security,Event Handling...
# 3

The following is general and not really specific to the Java implementation of HashMap:

Due to the nature of hashing, the maximum capacity of the structure is important in determine where new entries are "put". Also, the load factor (how full) is important in the performance of the structure (adding new entries, etc.).

When the structure reaches the load factor, the structure needs to be recreated and then all the entries rehashed to their appropriate location; therefore, both the load factor and starting capacity are important.

jbisha at 2007-7-8 0:57:16 > top of Java-index,Security,Event Handling...
# 4
> how full the hash table is allowed to get before> ?If you don't understand these things you should just do some internet searches on hash table data structures.
dubwaia at 2007-7-8 0:57:16 > top of Java-index,Security,Event Handling...