+ 1
dynamic arrays
how to dynamically create arrays in java
1 Answer
+ 2
By default arrays in Java are of fixed size. To create dynamic, you can use an ArrayList, one of a number Collections available in in the standard Java library.
Example:
List<Integer> ints = new ArrayList<Integer>();
will create a dynamic array of integers where, ints.add(y) and ints.remove(z) methods can be used to add and remove items from the array.
Do consult Java documentation for further information on collections.