Java by default do not has such util. What you can do is to use System.arraycopy
public static void copy(Object[] a, Object... b) {
int alen = a.length;
int blen = b.length;
Object[] c = new Object[alen + blen);
System.arraycopy(a, 0, c, 0, alen);
System.arraycopy(b, 0, c, alen, blen);
return c;
}
You may wish to use the generics
public static <T> void copy(T[] a, T... b) {
int alen = a.length;
int blen = b.length;
T[] c = (T[]) Array.newInstance(a.getClass(),alen + blen);
System.arraycopy(a, 0, c, 0, alen);
System.arraycopy(b, 0, c, alen, blen);
return c;
}
But all this is required if you are really attached to Arrays, but it seams that you change the size during program flow. Reconsider using a List<String>
that will allow you to store strings and extend it frellly.