private void resize(int N){
  Key[] array=(Key[])new Comparable[N];
  for (int i=0; i < Math.min(keys.length,array.length); i++) {
    array[i]=keys[i];
    keys[i]=null;
  }
  keys=array;
}

private void resize ( int N ) { Key [ ] array = ( Key [ ] ) new Comparable [ N ] ; for ( int i = 0 ; i < Math . min ( keys . length , array . length ) ; i ++ ) { array [ i ] = keys [ i ] ; keys [ i ] = null ; } keys = array ; }
resize the priority queue
