Answers for "increase array java"

1

resize array in java

int [] basedata = new int[10];

int [] original = basedata;
basedata = new int[12];

for(int i = 0; i < original.length; i++){
  basedata[i] = original[i];
}
Posted by: Guest on December-06-2020
0

change size of array java

newSizeArray = Arrays.copyOf(oldsizeArray, newSize);
Posted by: Guest on September-09-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language