Java, Programming, Data Structures, Stack And Queues, Technology.
method to add items to the queue, demonstrating the FIFO principle. The poll() method removes and returns the first item, showing how items are processed in the order they were added. Finally, the peek() method allows us to see the first item in the queue without removing it, demonstrating that the