This method of the Queue Class obtains the maximum number of objects that the queue can contain without resizing.
public int capacity();
Returns the maximum capacity (in objects) of the queue.