Exceptions in the Contract

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


previous | start | next .... [Slide 49] ....