All Elements in HashMap can be removed by clear() method. Clear() method in HashMap clear HashMap object and size of the HashMap will become 0
Code:
public class HashTable extends AbstractHashTable {
public HashTable (int tableSize);//create the table size
private HashTable ();
public int getSize (); //through this you can get the size of the Hash table
public int hashValue (String key);//set the flash value
public int probeHashValue (String key);set the string key
public boolean put (String key, Object value);//set the boolean value with string key and value
}
Bookmarks