6
Reply

What are differences between Array list and Hash table?

Ankur Jain

Ankur Jain

Aug 18, 2014
12.4k
0

    ArrayList--> Index based. HashTable-->Key based.

    Srikanth Reddy
    July 11, 2015
    1

    1) Hash table store data as name, value pair. While in array only value is store. 2) To access value from hash table, you need to pass name. While in array, to access value, you need to pass index number. 3) you can store different type of data in hash table, say int, string etc. while in array you can store only similar type of data.

    Ankur Jain
    August 18, 2014
    1

    Such a waste of time.. People are confused with simple basics. Go first and check the difference between an array and an arraylist. C# corner , we expect better from you.

    Avinava Basu
    September 08, 2016
    0

    I agree with Rohit, please do not put any invalid comments and content, question is for difference between arraylist and hashtable, people refer these sites for interview, do not post wrong answers

    Rishabh Jain
    August 29, 2016
    0

    Hashtable is key/value pair based collection where Arraylist is index based. arraylist canbe easily sorted but hashtable is not.

    Hassan-Kafi Abdi
    December 08, 2015
    0

    Duffer Ankur we are talking about ArrayList not Array. First you read the question then post your answer

    Rohit Rana
    July 30, 2015
    0