
Java – How to check whether a particular key is present in HashMap ?
In this article, we will discuss how to check whether a key is present in the invoking HashMap or Not 1. Searching a key from Read More
In this article, we will discuss how to check whether a key is present in the invoking HashMap or Not 1. Searching a key from Read More
In this article, we will discuss how to remove all entries from invoking HashMap 1. HashMap : clear() –> to delete all entries present in HashMap Note: above Read More
In this article, we will discuss how to remove a particular entry from invoking HashMap 1. HashMap : remove(key) –> to delete a particular entry by specifying Read More
In one of the previous article, we have discussed various ways to iterate through Map i.e.; Ways to iterate through Map: Using keySet() method and Read More
In this article, we will discuss various ways to iterate through HashMap or implementation classes of Map interface like LinkedHashMap or TreeMap Map implementation classes Read More
In this article, we will discuss how to find size or length of a HashMap or implementation classes of Map interface like LinkedHashMap or TreeMap Read More
In this article, we will discuss how to get all entries or Key-Value pairs of a HashMap or implementation classes of Map interface like LinkedHashMap Read More
In this article, we will discuss how to get all values of a HashMap or implementation classes of Map interface like LinkedHashMap or TreeMap 1. Read More
In this article, we will discuss how to get all keys of a HashMap or implementation classes of Map interface like LinkedHashMap or TreeMap 1. Read More
In this article, we will discuss how to remove elements from ArrayList while iterating Collections objects using Iterator interface Note: ConcurrentModificationException will be thrown when Read More
In this article, we will discuss how to get minimum element from ArrayList using Collections class’s utility min() method 1. To get minimum element from Read More
In this article, we will discuss how to get maximum element from ArrayList using Collections class’s utility max() method 1. To get maximum element from Read More
In this article, we will discuss how to convert Ordered ArrayList into Sorted TreeSet in Java We can sort ArrayList in both ascending and descending Read More
In this article, we will discuss how to sort HashSet contents in ascending as well as descending order Sorting HashSet in Ascending and Descending order: Read More
In this article, we will discuss how to convert Arrays into Set 1. 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 sort contents of LinkedList in ascending order containing only unique elements 1. Approach : Convert LinkedList into 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 various ways to iterate through Vector objects Various ways to iterate through Vector: regular for-loop Enhanced for-loop introduced in 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