0% found this document useful (0 votes)
16 views1 page

The Hashtable Class Methods

Uploaded by

victusanmol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

The Hashtable Class Methods

Uploaded by

victusanmol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

the Hashtable class methods

Method Description

Returns true if the hash table is empty; returns false if it contains at


boolean isEmpty()
least one key.

Enumeration<K>
Returns an enumeration of the keys contained in the hash table.
keys()

Inserts a key and a value into the hash table. Returns null if key isn’t
V put(K key, V
already in the hash table; returns the previous value associated with key
value)
if key is already in the hash table.

void rehash() Increases the size of the hash table and rehashes all of its keys.

V remove(Object Removes key and its value. Returns the value associated with key. If key
key) is not in the hash table, a null object is returned.

int size() Returns the number of entries in the hash table.

String toString() Returns the string equivalent of a hash table.

You might also like