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 are static blocks and static initalizers in java ?
Is string a class in java?
What is thread?
How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance
In C we use only compiler. Why java uses both compiler and interpreter? What is its significance?
What is a variable declaration?
Is java is a fully object object oriented language?
Why generics are used in java?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
List some java keywords sun like c, c + + keywords?
What is type conversion in java?
what really hapens when a object is created using new operator? 1.is it allocates memory to all variables and methods in the class with reference to that object?