Difference between Hashtable and HashMap

Based on my previous posts related to Hashtable and HashMap let’s see the difference. HashMap Hashtable Non-Synchronized. Fast. Synchronized. Slow Allows one null key and any number of null values. Hashtable doesn’t allow null keys and null values. Use LinkedHashMap to maintains the insertion order. TreeMap to sort mappings based on the ascending order of Read more…

By Ashish, ago

Hashtable in Java

We will find out answers for following question What is Hashtable Common methods available Hashtable HashTable is a member of Java Collection Framework as it implements Map Interface. HashTable implements a hash table, which maps keys to values. Any non-null object can be used as a key or as a Read more…

By Ashish, ago