i want to dynamically increase my array
Printable View
i want to dynamically increase my array
Vector and array-list are better option for dynamically increase or decrease the array size.
it depends on your requirement weather you are using multi-threaded environment or not.
If you must use arrays:
create new array of the desired size
copy contents of old array into the new array
set the array reference variable to the new array.