public boolean offer(E o){
  if (o == null) {
    throw new NullPointerException("o == null");
  }
  growToSize(size + 1);
  elements[size]=o;
  siftUp(size++);
  return true;
}

public boolean offer ( E o ) { if ( o == null ) { throw new NullPointerException ( "o == null" ) ; } growToSize ( size + 1 ) ; elements [ size ] = o ; siftUp ( size ++ ) ; return true ; }
inserts the element to the priority queue .
