public Object poll(){
  if (isEmpty())   return null;
  Object minItem=items.get(1);
  items.set(1,items.get(size));
  size-=1;
  reorder(1);
  return minItem;
}

public Object poll ( ) { if ( isEmpty ( ) ) return null ; Object minItem = items . get ( 1 ) ; items . set ( 1 , items . get ( size ) ) ; size -= 1 ; reorder ( 1 ) ; return minItem ; }
remove the smallest item from the priority queue .
