This method of the Queue Class determines if the queue is empty.
public synchronized boolean hasMoreElements();
Returns true if there are more elements in the queue; otherwise, returns false.