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
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.
How do you calculate roots in java?
Is there a case when finally will not execute?
What is mean by encoding?
What is the use of beaninfo?
Write a program to calculate factorial in java?
How to use string tokenizer class.
What is the private method modifier?
Explain methods specific to list interface?
What classes of exceptions may be caught by a catch clause in java programming?
What is replaceall in java?
Explain JMS in detail.
Can bool be null?
Is string a datatype?
What is the difference between exception and error in java?