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 |
Explain the difference between hashmap and hashtable in java?
Sample code to retrieve objects from HashMap in sorted ascending order?
Which is easier .net or java?
What data structures are used to perform recursion?
0 Answers Akamai Technologies,
What is lambda expression in java?
Which class contains a method: cloneable or object?
Explain the access modifiers for a class, method and variables?
How many types of threads are there in java?
There is a Banking application. It has 2 types of account, Savings and Current. Write a method calculateInterest by passing an ArrayList of these account objects and calculate Interest accordingly. Write code for this situation
What is the purpose of the return statement?
How many inner classes can a class have?
Is boolean a data type in java?