SE450: Exceptions in the Contract [50/57] Previous pageContentsNext page

/**
. . .
@throws NoSuchElementException if queue is empty
*/
public Message remove()
{
if (count == 0)
throw new NoSuchElementException();
Message r = elements[head];
. . .
}

Previous pageContentsNext page