TreeSet in Java | Java TreeSet Tutorial | Set in Java Part - 4 | Java Tutorial by Vikas Singh Sir

preview_player
Показать описание
In this video, Let's learn about the Set in Java, and What IsTreeSet in JAVA.

This is part 4 of Set in Java, make sure you watch Parts 1, 2, 3, & 5 of this Set In Java Tutorial to completely understand the important concepts of Set in Java.

Watch Here:

The set is an interface available in Java. util package.

The set interface extends the Collection interface. An unordered collection or list in which duplicates are not allowed is referred to as a collection interface.

The set interface is used to create the mathematical set.

The set interface uses the collection interface methods to avoid the insertion of the same elements.

TreeSet is one of the most important implementations of the SortedSet interface in Java that uses a Tree for storage. The ordering of the elements is maintained by a set using their natural ordering whether or not an explicit comparator is provided. This must be consistent with equals if it is to correctly implement the Set interface.

It can also be ordered by a Comparator provided at a set creation time, depending on which constructor is used. The TreeSet implements a NavigableSet interface by inheriting AbstractSet class.

______________________________________________

Want to learn Coding? or want to learn Computer Languages like C, C++, Java, Python, HTML, PHP, etc. then make sure you Subscribe to @codingseekho

#codingseekho #java #javatutorial #treeset #javatreeset #set #javaprogramming #learnjava #javaforbeginners
Рекомендации по теме