E - the type of element held by this queuepublic class Queue<E> extends Object
| Constructor and Description |
|---|
Queue()
Create an empty queue.
|
public void enqueue(E element)
element - the element to add to the back of the queuepublic E dequeue()
public boolean isEmpty()
true if this queue contains no elements.true if this queue contains no elements