What is a TreeSet class?

What is a TreeSet class?

- TreeSet class is used to store large amount of data and uses tree for storage.
- Items are stored in ascending order.
- TreeSet sorts all data properly even if data are entered in a unsorted manner.
- As the access and retrieval times fast the TreeSet becomes one of the best choice for storing large amounts of sorted information that can retrieved quickly.
- The implementation is not synchronized.
String object is immutable, Explain.
String object is immutable, Explain. - This means once you have created String object and assigned a value, you can’t change the value of the object....
Difference between traditional java Array and Arraylist class
Difference between traditional java Array and Arraylist class - Traditional java array is fixed length whereas ArrayList supports dynamic arrays that can grow...
Difference between pass by value and pass by reference
Difference between pass by value and pass by reference - In pass by value, a copy of variable is passed to the method; the values of the variable can’t be changed in the method.....
Post your comment