Explain treeset?



Explain treeset?..

Answer / Atul Prakash

A TreeSet in Java is a sorted Set implementation, which stores its elements in a tree structure and follows the Sortable interface. It allows null values but they are compared with equals() method. The elements are ordered according to their natural ordering, or by a Comparator provided at its creation time.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How to sort array of 0 and 1 in java?

1 Answers  


What is string syntax?

1 Answers  


How can we create a thread in java?

1 Answers  


Is null a value?

1 Answers  


Can we override the overloaded method?

1 Answers  


What is final class?

1 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What are the different types of sorting in java?

1 Answers  


program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called

1 Answers   Huawei,


what is mean by String and StringBuffer? What is mean by Methooverriding and Overloading?

3 Answers   Satyam, STI,


How do you replace a string in java?

1 Answers  


What services that container provides?

2 Answers  


Categories