コード例 #1
0
 protected double[] resizeArray(double[] oldArray) {
   int newSize = 2 * oldArray.length;
   double[] newArray = new double[newSize];
   System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
   return newArray;
 }
コード例 #2
0
 protected int[] resizeArray(int[] oldArray) {
   int newSize = 2 * oldArray.length;
   int[] newArray = new int[newSize];
   System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
   return newArray;
 }