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
What are peerless components in java programming?
What is an anonymous class in java?
Why generics are used in java?
Is linked list a linear or non-linear data structure?
Is namespace same as package in java?
How do you ensure that n threads can access n resources without deadlock?
Why do we use string?
What are parameters in a method?
What is the difference between a constructor and a method?
Differentiate between nested and inner class in java.
What is ascii code?
What is sorting in java?
why not override thread to make a runnable? : Java thread
What are the differences between wait() and sleep()?
explain multi-threading in java?