Is it possible to reset the number of values in an array after it's already been set? I have defined the number of values in the array through a variable, later that variable is updated by the user and I need to size of the array to be updated with it.
Ie:
numberOfPeople = 2;
Person person[] = new Person[numberOfPeople];
Later:
if(valueSelected == 3) {
numberOfPeople = 3; }
Above is just a very simplified example but basically that's what I've got, I just need the array size to actually change when the if
statement being executed.