This method of the Queue Class changes the queue's capacity.
public synchronized int setCapacity(int newcapacity);
Returns the actual final capacity assigned to the queue.