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
Can I learn java in 3 months?
What is a bubble sort in java?
Can you explain the final method modifier?
Name some OOPS Concepts in Java?
What are the advantages of inner classes?
What is difference between public static and void?
What is parsing and its types?
What is callablestatement? How you can call stored procedure to pass in parameter?
What is the purpose of the System class?
What is initial size of arraylist in java?
Which programming language is best in future?
Can we serialize singleton class?
Can keyword be used as identifier?
What is command line argument
How do you find the independent variable?