containsValue(Object value)

containsvalue(Object value): This method is used to check whether the specified Value exists in TreeMap or not. It returns type is boolean. If the given value exists TreeMap, then it returns true otherwise false in Java. Where, Value is the  value which you want to check in TreeMap.return type:  Its return type is boolean. It … Read more

TreeMap(Comparator comp)

In this post, we will see how to use a comparator in TreeMap and also see the treemap comparator example. If you are a beginner and you are not familiar with Comparator and TreeMap then I recommend you please read them first.(TreeMap(Comparator comp)) As we know TreeMap maintains the order of keys, by default it … Read more

Treemap in java

A TreeMap class is part of the Collection framework. The TreeMap implements the Map interface like HashMap and LinkedHashMap. We have learned about HashMap and LinkedHashMap in java. In this post, we will see what is TreeMap in java and TreeMap internal working. Let’s see the tree map java Here is the table content of … Read more

LinkedHashMap in java

We have seen all the details of HashMap in java and the Internal working of HashMap. In this post, we will see LinkedHashMap in java and LinkedHashMap example. The LinkedHashMap class is part of the Collection framework. Here is the table content of the article will we will cover this topic.1. LinkedHashMap in java?2. Important point … Read more

entrySet() method

entrySet(): This entrySet Hashmap method employs fetching the Set view of all keys and values in Java. It returns all the key and values in form of Set. This entry Set worked on backed of HashMap, if any change makes in HashMap also reflects in this Set and vice versa. It returns type is Set. … Read more

HashMap in java

Java HashMap class is one of the most popular Collection classes in java. The HashMap in java provides the implementation to the Java Map interface.In this post, we will discuss what is HashMap in java, HashMap internal working, java HashMap iterator, etc. Here is the table content of the article will we will cover this topic.1. … Read more

ArrayDeque in java

The ArrayDeque in java is a class that is a part of the Java Collection framework which extends AbstractCollection class and implements the Deque, Cloneable, and Serializable interface. ArrayDeque class provides the implementation of the Deque interface and provides a resizable array. It is also known as Array Double Ended Queue or Array Deck Array deques grow automatically, … Read more

Deque interface in java

Deque interface in java is part of Collection framework. In java Deque interface extends the Queue interface and its available in java.util package. It maintains the orders the elements in FIFO(First In First Out) or LIFO(Last In First Out) manner. The Deque is related to the double-ended queue that supports addition or removal of elements … Read more

PriorityQueue in java

The PriorityQueue class is a part of the Java Collection framework which extends AbstractQueue class and implements the Serializable interface. As we already know Queue works based on FIFO(First-In-First-Out model). But sometimes we want to process the objects based on priority and then PriorityQueue class comes in the role. Here is the table content of the article will … Read more

AbstractQueue class

The AbstractQueue class is a part of the Java Collection Framework which implements the Queue interface and extends the AbstractCollection class. The AbstractQueue class implements some methods of Queue interface and provides a skeletal implementation of the Queue interface. This class is used to minimize the effort required to implement the Queue interface. The AbstractQueue class implements the Queue interface and … Read more