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 |
How do you identify if jvm is 32-bit or 64-bit from java program?
Can It is possible to synchronize the constructor of a Java Class?
How could Java classes direct program messages to the system console, but error messages, say to a file?
What is java console application?
What is difference between final and finally in java?
What do you mean by Remote procedure call?
What is the latest version of java?
Name four container classes.
What is array length in java?
What is the difference between scrollbar and scrollpane?
What do you understand by looping in java? Explain the different types of loops.
What are the main uses of the super keyword?