Difference between treemap & sortedset

Answers were Sorted based on User's Feedback



Difference between treemap & sortedset..

Answer / amit kumar

1.Treemap is a class which has implemented SortedMap
interface where as Sortedset is an interface which has been
implemented by Treeset class.
2. Treemap can contain the duplicate value but the Treeset
which has implemented Sortedset can not hold duplicate
value.

Is This Answer Correct ?    5 Yes 2 No

Difference between treemap & sortedset..

Answer / pradip patil

TreeMap is implements Map interface it holds key and value pair and it doest allow duplicate keys where as it allows duplicate values.
TreeSet implements Set interface and it doesnt allow duplicats elements.

Is This Answer Correct ?    1 Yes 0 No

Difference between treemap & sortedset..

Answer / srikanth

treemap is used for storing key value pair without
duplicates in sorted order

sortedset is an interface which is extending set interface

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More J2EE Interview Questions

Is j2ee a programming language?

0 Answers  


What is non primitive data type in java?

0 Answers  


What is j2ee stand for?

0 Answers  


Which compiler is used in java?

0 Answers  


What are the components of awt in java?

0 Answers  






What does web module contain?

0 Answers  


What is deployer?

0 Answers  


is it possible to create single instance of java class per session in web application

4 Answers  


What is container-managed persistence?

0 Answers  


what is meant by proxy server

1 Answers  


What is business logic?

0 Answers  


Why java is not 100% object oriented language?

0 Answers  


Categories