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 “try and catch” in java
What is the purpose of the system class in java programming?
Explain what access modifiers can be used for variables?
Nullpointer exception is a very common exception. Why is it not made as a checked exception?
Why hashset is used in java?
There are three interfaces A,B & C. A extends B, B extends C, and C extends A.Is it multiple Inheritance? please anybody help me.....
What are the different types of inner classes?
How to solve the problem of generating the unique hash keys with hash function?
Does java have a compiler?
what is the difference between future and callable interface in java?
Can a class have multiple subclasses?
when to for abstract class and when to go for interface