Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to increase the size of array in java

// Use this function
public void increaseSize() {
   String[] temp = new String[original.length + 1];
   
   for (int i = 0; i < original.length; i++){
      temp[i] = original[i];
   }
   original = temp;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #increase #size #array #java
ADD COMMENT
Topic
Name
9+4 =