Java AbstractQueue.poll()

Java AbstractQueue.poll() is a method in the Java AbstractQueue class that retrieves and removes the head of the queue, or returns null if the queue is empty. This operation is typically used in queue-based applications where elements need to be consumed in a first-in, first-out (FIFO) order. Introduced in Java 2004 with Java 5, poll() is ideal for non-blocking queue implementations.

https://docs.oracle.com/javase/8/docs/api/java/util/AbstractQueue.html