
Java – Remove duplicate elements from ArrayList
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 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 Q) 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 It uses doubly-linked list and 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 Different 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 1. Adding one HashSet to another HashSet Read More
In this article, we will compare 2 HashSet contents using containsAll method of Collection interface Collection‘s containsAll() 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 1. 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 collection Read More
In this article, we will discuss an example on how to delete a particular element and later deleting all elements of HashSet 1. HashSet : Read More
In this article, we will discuss how to find size or length of HashSet 1. HashSet : We can use, size() method of Collection interface to Read More
In this article, we will discuss Collections class – a utility class for Collection framework which has useful methods for below operations like, Sorting Searching Reverse the Read More
In this article, we will discuss difference between HashMap and HashSet classes in detail i.e.; HashMap v/s HashSet 1. HashMap v/s HashSet: HashMap HashSet HashMap implements Read More
In this article, we will compare important implementation classes of Set i.e.; HashSet v/s LinkedHashSet v/s TreeSet So let’s us discuss in tabular format; 1. Read More
In this article, we will discuss difference between List and Set in detail i.e.; List v/s Set. Both interfaces directly extends Collection interface 1. List v/s Read More
In this article, we will discuss TreeSet class – the implementation class for NavigableSet interface in detail 1. Key points about TreeSet: TreeSet doesn’t allow duplicate Read More
In this article, we will discuss NavigableSet interface with all its important methods for navigation support in detail 1. Key points about NavigableSet: NavigableSet doesn’t Read More
In this article, we will discuss SortedSet interface with all its important methods in detail 1. Key points about SortedSet: SortedSet doesn’t allow duplicate items Read More
In this article, we will discuss difference between HashSet and LinkedHashSet classes in detail i.e.; HashSet v/s LinkedHashSet 1. HashSet v/s LinkedHashSet: HashSet LinkedHashSet Uses hashtable Read More
In this article, we will discuss LinkedHashSet class – one of the Set implemented classes in detail 1. Key points about LinkedHashSet: LinkedHashSet is exactly same Read More