Answers for "how to make an array in java without size"

1

how to initialise array in java without size

List<Type> arrayList = new ArrayList<>();
Posted by: Guest on April-16-2022
2

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;
}
Posted by: Guest on March-27-2022

Code answers related to "how to make an array in java without size"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language