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 / 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 |
What does singleton class mean?
Can this keyword be used to refer static members?
Why we cannot override static method?
What is the synchronized method modifier?
What is called module?
Can we nested try statements in java?
Why array is used in java?
What does a boolean method return?
Difference between static and dynamic class loading.
What restrictions are placed on method overloading in java programming?
What is the full form of jpeg?
How do you square a number in java?