Question 6 [9]
6.1 In what situations (in general) would you use a
TreeMap? (3)
6.2 In what situations (in general) would you use a HashSet
to store a collection of
values?
Answer Posted / ashima
TeeMap is used when the data is to be stored in a sorted
order of the keys.
HashSet is used when it is not required to store the data
in the sroted order. Also, the insertion, deletion and
selection is faster in HashSet.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a treeset in java?
What purpose do the keywords final, finally, and finalize fulfill?
Can a method inside a interface be declared as final?
What is the difference between compiler and jvm?
Which class is the superclass for every class in java programming?
What is the old name of java?
How is the marker interface used in Java?
Is empty in java?
What are the methods of object class ?
When object is created and destroyed?
How to compare strings in java?
What is procedure overloading?
Explain the selection sort algorithm?
What sorting algorithm does javascript use?
what is an objects lock and which objects have locks? : Java thread