public static final int[] resize(int[] a,int size){
  if (a.length >= size)   return a;
  int[] b=new int[size];
  System.arraycopy(a,0,b,0,a.length);
  return b;
}

public static final int [ ] resize ( int [ ] a , int size ) { if ( a . length >= size ) return a ; int [ ] b = new int [ size ] ; System . arraycopy ( a , 0 , b , 0 , a . length ) ; return b ; }
resize the given array as needed to meet a target size .
