Queue interface in Java

The Queue interface is in java.util package and extends the Collection interface. Queue is used to hold elements in FIFO(First In First Out) order. It is an ordered list of objects with its use limited to inserting elements at the end of the list and deleting elements from the start of the list, i.e., it follows the FIFO or the First-In-First-Out principle.