code: public Object peek()
          throws InterruptedException
      {
          synchronized(lock)
          {
              if (size==0)
                  lock.wait();
              
              if (size==0)
                  return null;
              
              Object o = elements[head];
              return o;
          }
      }
docs: Peek at the  queue.
  Block  if there are no objects to peek.
  @return The next object in the queue, or null if timedout.