
Java 8 – Find First and Last elements in a Set or HashSet
In this article, we will discuss how to get First and Last elements from a Set or HashSet using Java 8 Streams API Find First Read More
In this article, we will discuss how to get First and Last elements from a Set or HashSet using Java 8 Streams API Find First Read More
In this article, we will discuss how to merge or concatenate 2 Arrays of same type. In one of the previous article, we already discussed Read More
In this article, we will discuss how to convert a modifiable HashSet into an unmodifiable HashSet using Collections.unmodifiableSet(); method Convert HashSet to Read-only HashSet is Read More
In this article, we will discuss how to convert Stream into a HashSet in Java 1.8 version using Stream API. Unlike List, Set neither allows Read More
In this article, we will discuss Stream’s concat() method which is used to merge elements from 2 or more Streams into single Stream consisting of Read More
In this article, we will discuss Stream’s collect() method in details with examples 1. Stream collect() method: This Stream method is a terminal operation which Read More
In this article, we will discuss how to sort HashSet in Java 8. Already, in one of the earlier article we discussed about HashSet sorting in Read More
In this article, we will discuss how to sort HashSet. Already, in one of the earlier article we discussed about HashSet sorting in ascending & Read More
In this article, we will discuss various ways to remove duplicate elements from Arrays in Java i.e.; Various ways to remove duplicate elements from Arrays: Read More
In this article, we will discuss how to remove duplicate elements from ArrayList in Java Already, we have discussed in one of the earlier article Read More
In this article, we will discuss difference between CopyOnWriteArraySet and SynchronizedSet classes in detail i.e.; CopyOnWriteArraySet v/s SynchronizedSet Lets us move on and discuss key differences Read More
In this article, we will discuss difference between CopyOnWriteArraySet and HashSet classes in detail i.e.; CopyOnWriteArraySet v/s HashSet Lets us move on and discuss key differences Read More
In this article, we will discuss CopyOnWriteArraySet class – the implementation class for Set interface in detail This is the thread-safe version of Set and Read More
In this article, we will discuss how to sort HashSet contents in ascending as well as descending order Solution: Ascending order: by passing HashSet contents as Read More
In this article, we will discuss how to convert Arrays into Set Conversion of Arrays into List using asList() method : We can use Read More
In this article, we will discuss how to convert HashSet into Arrays using Collection’s toArray() method Conversion of HashSet into Arrays using toArrays() method Read More
In this article, we will discuss how to remove duplicate elements from ArrayList How to convert ArrayList to HashSet ? use inter-conversion collection constructor Read More
In this article, we will discuss how to reverse the contents of LinkedHashSet Key points about LinkedList: LinkedHashSet maintains insertion-order as it uses doubly-linked list Read More
In one of the previous article, we have discussed various ways to iterate through Set Various ways to iterate through Set Enhanced for-loop (introduced in Read More
In this article, we will discuss various ways to iterate through HashSet – 3 ways Various ways to iterate through HashSet: Enhanced for-loop introduced in Read More