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 Posted / 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 |
Post New Answer View All Answers
Why string is a class?
What is final method in java?
What is this keyword used for?
What do you mean by ternary operator in java?
Why does it take so much time to access an applet having swing components the first time?
What is a java object and java application?
What is the difference between an argument and a parameter?
Is string is a data type in java?
What is a module function?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
What are 3 data types?
Explain importance of finally block in java?
How do you declare a destructor in java?
Is java util list serializable?
Which data type is class in java?