In this post I will show you how to do this easily.
Think you have following array. The size of this array is 1.
String[] arr = new String[1];
Now you can increase the size of your array like this.(replace the word "NEW_SIZE" with your new size)
arr=(String[]) Arrays.asList(arr).toArray(new String[NEW_SIZE]);
No comments:
Post a Comment