ConcurrentLinkedQueue isEmpty() method in Java
The isEmpty() method of ConcurrentLinkedQueue is used to check if this queue is empty or not. It returns true if ConcurrentLinkedQueue contains zero number of elements means if the ConcurrentLinkedQueue is empty.
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 boolean isEmpty()
Returns: This method returns true if this ConcurrentLinkedQueue contains zero number of elements.
Below programs illustrate isEmpty() method of ConcurrentLinkedQueue:
ConcurrentLinkedQueue: [Aman, Amar, Sanjeet, Rabi] Is Queue empty: false
ConcurrentLinkedQueue:  Is queue empty : true