
Java 8 – How to split a String and Collect to any Collection
In this article, we will discuss how to split a String using different delimiters and collect to any Collection or List or Set Split a Read More
In this article, we will discuss how to split a String using different delimiters and collect to any Collection or List or Set Split a 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 TreeSet in Java 1.8 version using Stream API. TreeSet doesn’t allow duplicates but Read More
In this article, we will discuss how to convert Stream into a LinkedHashSet in Java 1.8 version using Stream API. LinkedHashSet doesn’t allow duplicates but 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 how to remove duplicate element/objects from LinkedList with examples using different approaches Also read How to remove duplicates from 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. 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 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
In this article, we will add one HashSet contents to another HashSet using addAll method of Collection interface Adding one HashSet to another HashSet Read More
In this article, we will compare 2 HashSet contents using containsAll method of Collection interface This Collection method is used to check whether one Set Read More
In this article, we will discuss an example on how to search, whether particular element present in HashSet or NOT Searching element from HashSet Read More
In this article, we will discuss retainAll() method of Collection interface with HashSet boolean retainAll(Collection c); remove/deletes all element/objects of invoking collection except specified Read More