- Java.util - WeakHashMap
- Java.util - Vector
- Java.util - UUID
- Java.util - TreeSet
- Java.util - TreeMap
- Java.util - TimeZone
- Java.util - TimerTask
- Java.util - Timer
- Java.util - StringTokenizer
- Java.util - Stack
- Java.util - SimpleTimeZone
- Java.util - ServiceLoader
- Java.util - Scanner
- Java.util - ResourceBundle.Control
- Java.util - ResourceBundle
- Java.util - Random
- Java.util - PropertyResourceBundle
- Java.util - PropertyPermission
- Java.util - Properties
- Java.util - PriorityQueue
- Java.util - Observable
- Java.util - Locale
- Java.util - ListResourceBundle
- Java.util - LinkedList
- Java.util - LinkedHashSet
- Java.util - LinkedHashMap
- Java.util - IdentityHashMap
- Java.util - Hashtable
- Java.util - HashSet
- Java.util - HashMap
- Java.util - GregorianCalendar
- Java.util - Formatter
- Java.util - EnumSet
- Java.util - EnumMap
- Java.util - Dictionary
- Java.util - Date
- Java.util - Currency
- Java.util - Collections
- Java.util - Calendar
- Java.util - BitSet
- Java.util - Arrays
- Java.util - ArrayList
- Java.util - ArrayDeque
- Java.util - Home
Java.util Package Extras
- Java.util - Discussion
- Java.util - Useful Resources
- Java.util - Enumerations
- Java.util - Exceptions
- Java.util - Interfaces
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.util.LinkedHashSet Class
Introduction
The java.util.LinkedHashSet class is a Hash table and Linked pst implementation of the Set interface, with predictable iteration order.Following are the important points about LinkedHashSet −
This class provides all of the optional Set operations, and permits null elements.
Class declaration
Following is the declaration for java.util.LinkedHashSet class −
pubpc class LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable, Seriapzable
Parameters
Following is the parameter for java.util.LinkedHashSet class −
E − This is the type of elements maintained by this set.
Class constructors
Sr.No. | Constructor & Description |
---|---|
1 | LinkedHashSet() This constructs a new, empty pnked hash set with the default initial capacity (16) and load factor (0.75). |
2 | LinkedHashSet(Collection<? extends E> c) This constructs a new pnked hash set with the same elements as the specified collection. |
3 | LinkedHashSet(int initialCapacity) This constructs a new, empty pnked hash set with the specified initial capacity and the default load factor (0.75). |
4 | LinkedHashSet(int initialCapacity, float loadFactor) This constructs a new, empty pnked hash set with the specified initial capacity and load factor. |
Class methods
This class inherits methods from the following classes −
java.util.HashSet
java.util.AbstractSet
java.util.AbstractCollection
java.util.Object
java.util.Set