Java / Collections
What are the similarities between HashSet, LinkedHashSet and TreeSet In Java?
Although these implementations had considerable difference, there share similarities with each other.
- None of them allow duplicate elements.
- None of them are synchronized.
- All are Cloneable and Serializable.
- Iterator returned by these implementations are fail-fast i.e We will encounter ConcurrentModificationException if the collection is modified after the creation of Iterator object.
- Last but not least all implement Set interface.
More Related questions...