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?



Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situ..

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

Post New Answer

More Core Java Interview Questions

Define iterator and methods in iterator?

1 Answers  


How to overcome the exception object reference not set to an instance of object?

1 Answers   Wipro,


What are abstract classes and anonymous classes?

1 Answers   Flextronics, Thomson Reuters, Virtusa,


How u dubugg ur project?

1 Answers   iFlex,


What is contractor means and methods?

1 Answers  


What is the simpletimezone class in java programming?

1 Answers  


Can you explain the final method modifier?

1 Answers  


Why is multiple inheritance not supported in java?

1 Answers  


What is a consumer in java?

1 Answers  


Explain JPA in Java.

1 Answers  


What is meant by class loader and how many types are there?

2 Answers   Apple,


what is the life cycle of jsp?

3 Answers   Photon,


Categories