Diffrence between arraylist and hashmap
Answers were Sorted based on User's Feedback
Answer / srikanth
arraylist is used for storing collection of elements with
duplicates
they can store only keys
it is extending list interface
hashmap
--------
hashmap is used for storing collection of elements with key
value pair without duplicates in unordered way
it is extending map interface
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / srikanth
Arraylist is an ordered collection.of objects
they store their elements in index.rotation
Duplicate values are also allowed.
they show their elements in order ie... added order
But in hashmap is also ordered collection but don't contain
duplicate values.
Hashmap use key value for any object access.
hashmap allow null values
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / billuyadav208
Arraylist is an ordered collection.
User access elements by their interger index.
Duplicate values are also allowed.
But in hashmap is also ordered collection but don't contain
duplicate values.
Hashmap use key value for any object access.
| Is This Answer Correct ? | 4 Yes | 4 No |
I Want build and release interview questions
Write a program for Sum of the digits for a given number Ex: suppose user entered Number is 1214, It should calculate the above number like 1+2+1+4 = 8
Give some advantages of orm (object-relational mapping)?
Sapient Interview Questions
What is repaint in java?
Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .
What are the tools in java?
How can I be good in java?
How to create object without using the keyword “new” in java?
What is front end technology in java?
What is external entity?
What is the use of method saveorupdate()?