I need to concatenate two String arrays in Java.
void f(String[] first, String[] second) {
String[] both = ???
}
What is t
Or with the beloved Guava:
String[] both = ObjectArrays.concat(first, second, String.class);
Also, there are versions for primitive arrays:
Booleans.concat(first, second)Bytes.concat(first, second)Chars.concat(first, second)Doubles.concat(first, second)Shorts.concat(first, second)Ints.concat(first, second)Longs.concat(first, second)Floats.concat(first, second)