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…

HashMap in Java

We will find out answers for the following question What is HashMap in Java Common methods available HashMap HashMap is a Map-based collection class that is used to store Key & value pairs. It is denoted as HashMap<Key, Value> or HashMap<K, V>. This class makes no guarantees as to the Read more…

Collection Framework in Java – Overview

What Is a Collections Framework? A collections framework is a unified architecture for representing and manipulating collections. All collections frameworks contain the following: Interfaces Implementations Algorithms Benefits of the Java Collections Framework Reduces programming effort: By providing useful data structures and algorithms, the Collections Framework frees you to concentrate on Read more…