Skip to content

Tag Archives: Java – util package

TreeMap firstEntry() refers to the method used to retrieve the key-value pairs mapped with the lowest key value element that exists in the TreeMap, if… Read More
The ExecutorService interface extends Executor by adding methods that help manage and control the execution of threads. It is defined in java.util.concurrent package. It defines… Read More
The computeIfPresent(Key, BiFunction) method of HashMap class which allows you to compute value of a mapping for specified key if key is already associated with… Read More
The remainingCapacity() method of BlockingQueue returns the number of more elements that can be added to BlockingQueue without blocking. The Capacity returned arises in three… Read More
The replaceAll(BiFunction) method of HashMap class replaces each value with the result of applying the given function(performs a certain operation) on the corresponding value. This… Read More
The getOrDefault(Object key, V defaultValue) method of Map interface, implemented by HashMap class is used to get the value mapped with specified key. If no… Read More
The takeLast() method of BlockingDeque returns and removes the tail of the Deque container from it. The method throws an InterruptedException if it is interrupted… Read More
The removeLastOccurrence() method of BlockingDeque removes the last occurrence of the specified element from this deque. If the deque does not contain the element, it… Read More
The size() method of BlockingDeque returns the current size of the Deque container. On calling the function the number of elements in the Deque container… Read More
The removeFirstOccurrence() method of BlockingDeque removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it… Read More
The take() method of BlockingDeque returns and removes the head of the Deque container from it. The method throws an InterruptedException if it is interrupted… Read More
The takeFirst() method of BlockingDeque returns and removes the first element of the Deque container from it, waiting if necessary until an element becomes available..… Read More
The remove() method of BlockingDeque removes the head of the Deque container. The method throws a NoSuchElementException if the Deque container is empty. If an… Read More
The forEach(BiConsumer) method of HashMap class perform the BiConsumer operation on each entry of hashmap until all entries have been processed or the action throws… Read More
The merge(Key, Value, BiFunctional) method of HashMap class is used to combine multiple mapped values for a key using the given mapping function. Bucket is… Read More