Have a Question?

If you have any question you can ask below or enter what you are looking for!

Tag: Explain HashSet in collection

Difference between HashSet and LinkedHashSet?

Difference between HashSet and LinkedHashSet?

Difference between HashSet and LinkedHashSet? It is the child class of HashSet. A LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. Contains unique elements only like HashSet. Provides all optional set operations, and permits null elements. Maintains insertion order. LinkedHashSet doesn’t have its . . . Read more

HashSet in Java and what is FillRatio or LoadFactor?

HashSet in Java and what is FillRatio or LoadFactor?

HashSet in Java and what is FillRatio or LoadFactor? The underlying data-structure is Hashtable. Duplicate objects are not allowed. Insertion order is not preserved and it is based on HashCode of objects. Null insertion is possible (only once). Heterogeneous objects are allowed. Implements serializable and cloneable but not the RandomAccess interface. . . . Read more