public Item dequeue() {
		if (isEmpty())
			throw new NoSuchElementException();

		// Remove from the front.
		Item t = q[front];
		front = (front + 1) % (N + 1);

		if (size() < N / 2)
			q = resize(N / 2);

		System.out.println("dequeue -> front: " + front + " rear: " + rear);
		System.out.println(toString());
		return t;
	}