which one is performance wise advantageious from List,Set,Map?
Answer Posted / debapriya
See HasMap is used when u want to use key value pair
If u r storing Any Objects the better u write ur code for
hascode implementation ,the better the the retrieval process is
Set maintains order,each time u add a object ,it checks
whether it exists or not calling equals which in turn calls
the hashcode method(x.equals(y) means x.hashcode==y.hashcode)
List --->in case if u use Vector or ArrayList since both of
them implenets RandomAccessInterface so retrieval is faster
but addition or deletion is slower
LinkedList --->deletion or insertion is faster but does not
implemet RandomAccess interface
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How many types of classes are there in java?
What is the declaration statement?
Why 1 is not a prime number?
What are adapter classes?
Can a class be private or protected in java?
Explain an intermediate language?
What is an empty string in css?
What are thread groups?
What do you understand by the term singleton?
What do you understand by java?
What are the types of strings?
How do you use equal in java?
What are multiple inheritances?
Can we force the garbage collection to run?
Explain creating threads by extending thread class ?