Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
Java
9.3K+ articles
Misc
7.8K+ articles
Java - util package
1.6K+ articles
Java-Collections
1.1K+ articles
java-stream
142+ articles
java-list
95+ articles
java-hashset
80+ articles
java-set
34+ articles
Java-Stream-programs
27+ articles
Java-Set-Programs
23 posts
Recent Articles
Popular Articles
Convert HashSet to TreeSet in Java
Last Updated: 11 July 2025
Hashset: Hashset in Java is generally used for operations like search, insert and delete. It takes constant time for these operations on average. HashSet is faster than Tr...
read more
Java
Picked
Java-Collections
Java - util package
java-treeset
java-hashset
Java-Set-Programs
Difference and similarities between HashSet, LinkedHashSet and TreeSet in Java
Last Updated: 12 August 2022
In this article, we will learn, the difference between HashSet vs LinkedHashSet and TreeSet And similarities between LinkedHashSet and TreeSet. HashSet, LinkedHashSet, and...
read more
Java
Technical Scripter
Technical Scripter 2018
Java-Collections
Java - util package
java-treeset
java-hashset
java-LinkedHashSet
Java-Set-Programs
Difference between ArrayList and HashSet in Java
Last Updated: 11 July 2025
Here are couple of differences between ArrayList and HashSet.Inheritance: Implementation: Implementation : ArrayList implements List interface while HashSet implements Set...
read more
Java
Technical Scripter
Difference Between
Technical Scripter 2018
Java-Collections
Java-ArrayList
java-hashset
Java-List-Programs
Java-Set-Programs
Difference Between LinkedList and LinkedHashSet in Java
Last Updated: 11 July 2025
In this article you will learn difference between LinkedList and LinkedHashSet in java.Prerequisite: LinkedList : LinkedHashSetLinkedList class implements the List and De...
read more
Java
Technical Scripter
Technical Scripter 2018
java-LinkedList
java-LinkedHashSet
Java-List-Programs
Java-Set-Programs
How to sort TreeSet in descending order in Java?
Last Updated: 11 July 2025
Given a TreeSet in Java, task is to sort elements of TreeSet in Descending Order (descreasing order).Examples:Input : Set: [2, 3, 5, 7, 10, 20]Output : Set: [20, 10, 7, 5,...
read more
Java
Technical Scripter
Java Programs
Java-Collections
java-treeset
Java-Set-Programs
How to Loop Over TreeSet in Java?
Last Updated: 11 July 2025
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 u...
read more
Java
Java-Collections
java-treeset
Java-Set-Programs
How to sort HashSet in Java
Last Updated: 11 July 2025
Given a HashSet in Java, the task is to sort this HashSet.Examples:Input: HashSet: [Geeks, For, ForGeeks, GeeksforGeeks]Output: [For, ForGeeks, Geeks, GeeksforGeeks]Input:...
read more
Java
Java-Collections
java-hashset
Java-Set-Programs
Difference between HashMap and HashSet
Last Updated: 11 July 2025
HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet must override equals() for check ...
read more
Java
Technical Scripter
Difference Between
Java-Collections
Java-HashMap
java-hashset
Java-Map-Programs
Java-Set-Programs
Program to convert Array to Set in Java
Last Updated: 11 July 2025
Array is a group of like-typed variables that are referred to by a common name. An array can contain primitives data types as well as objects of a class depending on the d...
read more
Java
Java - util package
Java-Arrays
java-set
Java-Array-Programs
Java-Set-Programs
Program to convert a Set to Stream in Java using Generics
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
java-stream
java-set
Java-Stream-programs
Java-Set-Programs
Program to convert set of String to set of Integer in Java
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
Java Programs
Java-Strings
java-set
Java-Integer
Java-String-Programs
Java-Set-Programs
Program to Convert Set to List in Java
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
Java Programs
Java - util package
java-set
java-list
Java-List-Programs
Java-Set-Programs
Program to Convert Set of Integer to Set of String in Java
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
Java Programs
Java - util package
Java-Strings
java-set
Java-Integer
Java-Array-Programs
Java-String-Programs
Java-Set-Programs
Program to Convert Set of Integer to Array of Integer in Java
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
Java Programs
Java - util package
Java-Arrays
java-set
Java-Integer
Java-Array-Programs
Java-Set-Programs
Convert List to Set in Java
Last Updated: 11 July 2025
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can accommodate only one nul...
read more
Misc
Java
Java - util package
java-set
java-list
Java-List-Programs
Java-Set-Programs
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !