LinkedTransferQueue remainingCapacity() method in Java with Examples
The Java.util.concurrent.LinkedTransferQueue.remainingCapacity(): method always returns Integer.MAX_VALUE as this kind of queue is not capacity constrained.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
public int remainingCapacity()
Parameters: This method does not take in any parameters.
Returns: This method returns only one value i.e. Integer.MAX_VALUE.
Below examples illustrates the LinkedTransferQueue.remainingCapacity() method:
Linked Transfer Queue1: [7855642, 35658786, 5278367, 74381793] 2147483647
Linked Transfer Queue1: [Geeks, For, Geeks, GeeksForGeeks] 2147483647