Colletions Key Point

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Collections Key Points

ArrayList LinkedList Vector Stack


Order Order by Insertion Order by Insertion Order by Insertion Order by Insertion
Duplicates Allowed Allowed Allowed Allowed
Null Value Allowed Allowed Allowed Allowed
Synchronized Not Synchronized Not Synchronized Synchronized Synchronized
Data Structure Resizable Array Double Linked List Resizable Array Resizable Array
Initial Capacity 10 ------ 10 10

HashSet LinkedHsahSet TreeSet


Ordered Unordered Ordered by Insertion Sorted Order
Duplicates Not Allowed Not Allowed Not Allowed
Null Value Allowed Allowed Allowed
Synchronized Not Synchronized Not Synchronized Not Synchronized
Data Structure Hashtable Hashtable + double Linked list Balanced Tree
Initial Capacity 16 16 ---------

HashMap LinkedHashMap TreeMap Hashtable


Ordered Unordered Ordered by Insertion Sorted Order Unordered
Duplicates Key Not Allowed Not Allowed Not Allowed Not Allowed
Values Allowed Allowed Allowed Allowed
Null Value Allowed Allowed Allowed Not Allowed
Synchronized Not Synchronized Not Synchronized Not Synchronized Synchronized
Data Structure Hashtable Hashtable + Double Red-Black Tree Hashtable
Linked List
Initial Capacity 16 16 ------- 11

Iterator ListIterator Enumeration


Applicable to Classes Classes Implementing List Legacy Classes
Implementing Interface
Collection Interface
Accessibility Forward direction Forward and backward Forward direction
direction
Operations Performed Accessing Removing Accessing, Removing , Accessing
Replacing , Adding
Method to Access Iterator() listIterator() Elements()
Number of methods 3 9 2
Collections Key Points

You might also like