Array List
- Array List is a List.
- In Array list we can only add items to the list.
- Here we Can Add any datatype value,Every item in Arraylist is treated as object.
- Index Numeric.
- Data in Arraylist is stored in as only the value.
- Slow when come to search
Hash Table
- .Hash Table is a map.
- In Hashtable we can add data with the key.
- Retrieving by key in Hashtable is faster than retrieving in Arraylist.
- Index can be string also.
- Data in Hashtable is stored in the key-value pair.
- Fast when searching.
No comments:
Post a Comment