Skip to content

Tag Archives: Java-Collections

The toArray() method of Java TreeSet is used to form an array of the same elements as that of the TreeSet. Basically, it copies all… Read More
The toString() method of Java TreeSet is used to return a string representation of the elements of the Collection. The String representation comprises a set… Read More
The toArray(T[]) method method of TreeSet class in Java is used to form an array of the same elements as that of the TreeSet. It… Read More
The equals() method of java.util.TreeSet class is used to compare the specified object with this set for equality. Returns true if and only if the… Read More
The removeAll() method of java.util.TreeSet class is used to remove from this set all of its elements that are contained in the specified collection. Syntax:… Read More
The equals() method of java.util.ConcurrentLinkedDeque class is used to compare the specified object with this ConcurrentLinkedDeque for equality. Returns true if and only if the… Read More
The hashCode() method of ConcurrentLinkedDeque in Java is used to get the hashCode value for this instance of the ConcurrentLinkedDeque. It returns an integer value… Read More
The push() method of ConcurrentLinkedDeque class is an in-built function in Java which pushes an element onto the stack represented by this deque (in other… Read More
iterator() method of Vector class that is present inside java.util package is used to return an iterator of the same elements as that of the… Read More
The iterator() method of DelayQueue is used to return an iterator over all the elements in the DelayQueue. These elements can be expired or unexpired.Syntax:  … Read More
The get() method of Dictionary class is used to retrieve or fetch the value mapped by a particular key mentioned in the parameter. It returns… Read More
The Java.util.concurrent.CopyOnArrayList.retainAll() method in Java is used to retain only the elements in the list that are contained in specific collection. Syntax: public boolean retainAll(Collection… Read More
The size() Method of Dictionary class in Java is used to know the size of the dictionary or the number of distinct keys present in… Read More
The Java.util.concurrent.LinkedTransferQueue.remainingCapacity(): method always returns Integer.MAX_VALUE as this kind of queue is not capacity constrained. Syntax public int remainingCapacity() Parameters: This method does not take… Read More
The tailSet() method of java.util.concurrent.ConcurrentSkipListSet is an in-built function in Java where the elements which are equal to or greater than the specified element are… Read More

Start Your Coding Journey Now!