About 17,100 results
Open links in new tab
  1. HashSet (Java Platform SE 8 ) - Oracle

    HashSet public HashSet(Collection <? extends E> c) Constructs a new set containing the elements in the specified collection. The HashMap is created with default load factor (0.75) and an initial capacity …

  2. HashSet in Java - GeeksforGeeks

    Apr 24, 2026 · HashSet in Java implements the Set interface of the Collections Framework. It is used to store the unique elements, and it doesn't maintain any specific order of elements. HashSet does not …

  3. HashSet<T> Class (System.Collections.Generic) | Microsoft Learn

    The HashSet<T> class is based on the model of mathematical sets and provides high-performance set operations similar to accessing the keys of the Dictionary<TKey,TValue> or Hashtable collections. In …

  4. HashSet (Java SE 17 & JDK 17) - Oracle

    Set s = Collections.synchronizedSet(new HashSet(...)); The iterators returned by this class's iterator method are fail-fast: if the set is modified at any time after the iterator is created, in any way except …

  5. Java HashSet - W3Schools

    Java HashSet A HashSet is a collection of elements where every element is unique. It is part of the java.util package and implements the Set interface.

  6. A Guide to HashSet in Java - Baeldung

    Jul 3, 2025 · HashSet is one of the fundamental data structures in the Java Collections API. Let’s recall the most important aspects of this implementation: It stores unique elements and permits nulls It’s …

  7. Java HashSet - Tpoint Tech

    Mar 27, 2026 · In terms of performance, HashSet generally provides better performance for search operations compared to List because it uses hashing internally, while List relies on index-based or …

  8. HashSet Java: The Ultimate Guide to Unique Collections

    Feb 11, 2026 · Master Java HashSet with practical examples. Learn how to add, remove, check elements, remove duplicates, and perform set operations like union and intersection.

  9. Initializing HashSet in Java - GeeksforGeeks

    Jan 22, 2026 · In Java, HashSet is a part of the java.util package is used to store a collection of unique elements. It does not allow duplicate values and does not maintain any insertion order. Initializing a …

  10. HashSet in Java | Features, Hierarchy, Constructors, & Methods

    Jun 13, 2026 · This hashset in Java tutorial will help you learn all about Features ️Hierarchy ️Constructors ️Methods ️and more. Read on to know more about java hashset.