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 are thread priorities and importance of thread priorities in java?
What is a buffer in computer?
What is the diffrence between inner class and nested class?
What is the list interface?
How many types of methods are there in java?
What is the difference between the font and fontmetrics classes in java programming?
When should you make a function static?
Is intellij better than eclipse?
Why do we use predicate in java?
how to create daemon thread in java?
What is an infinite loop?
Can we able to pass objects as an arguments in java?
What do you mean by append?
Explain a situation where finally block will not be executed?
What does string intern() method do?