Difference between ArrayLst and HashTable

ArrayList

ArrayList is a liner data structure that hold items just like an array
Each element can be accessed with index
The size of the ArrayList object will increase dynamically based on requirement
It allows null values and duplicate values
we can store only similar type of data

Hash Table

Hash Table store data as key,value pairs
Each elements can be accessed with index/Key
it doesn't allow null and duplicate values
we can store different type of data
 



No comments:

Post a Comment