Queue Collection Types
Theclass and the generic class are first-in-first-out collection classes that implement the interface and the generic interface.
The Queue andclasses, and the Queue and generic classes are useful when you need temporary storage for information, that is, when you might want to discard an element after retrieving its value. Use Queue if you need to access the information in the same order that it is stored in the collection. Use Stack if you need to access the information in reverse order.
Three main operations can be performed on a Queue and its elements:
Enqueue adds an element to the end of the Queue.
Dequeue removes the oldest element from the start of the Queue.
Peek returns the oldest element from the start of the Queue but does not remove it from the Queue.