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 is the difference between sop and work instruction?
What is a resource leak ?
What are the limitations of procedural programming approach?
what is Hashmap & Hashtable wirh example?
Java violates few objected oriented concepts. Can you explain in what way?
What is floor in java?
What is the method in java?
Can inner class final?
What is thread priority?
What is the difference between comparison done by equals method and == operator?
What is console based application in java?
Explain about method local inner classes or local inner classes in java?