- A Hashtable is an array of list.Each list is known as a bucket.The position of bucket is identified by calling the hashcode() method.A Hashtable contains values based on the key. It implements the Map interface and extends Dictionary class.
- It contains only unique elements.
- It may have not have any null key or value.
- It is synchronized.
Example of Hashtable:
Output:103 Rahul 102 Ravi 101 Vijay 100 Amit
No comments:
Post a Comment