java.util.Hashtable.rehash() Method



Description

The rehash() method is used to increase the capacity and internally reorganizes this hashtable.This is done to accommodate and access its entries more efficiently.This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity.

Declaration

Following is the declaration for java.util.Hashtable.rehash() method.

protected void rehash()

Parameters

NA

Return Value

NA

Exception

NA

Example

NA

This is a protected method and called automatically when the number of keys in the hashtable exceeds this hashtable's capacity.So the stand alone application can not be used to test the method.

java_util_hashtable.htm
Advertisements