What is difference between hashmap and arraylist?



What is difference between hashmap and arraylist?..

Answer / Nidhi Chandra

A HashMap in Java is a collection of key-value pairs, while an ArrayList is a dynamic-size array. A HashMap does not maintain the order of its elements, but an ArrayList maintains the insertion order.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is a hashmap a dictionary?

1 Answers  


How can you implement a stack?

1 Answers   NIIT,


wt is a datastructure

8 Answers   CybAge,


What is the difference between array and stack?

1 Answers  


What does quick sort do?

1 Answers  


Which is the parent class of abstractsequentiallist class?

1 Answers  


Why null is allowed in hashmap?

1 Answers  


What are the disadvantages of linked list?

1 Answers  


How is the front of the queue calculated in data structure?

1 Answers  


How does a heap sort work?

1 Answers  


Parenthesis is never required in postfix or prefix expressions, why?

1 Answers  


Is an arraylist an object?

1 Answers  


Categories