I need to concatenate two String arrays in Java.
String
void f(String[] first, String[] second) { String[] both = ??? }
What is t
Using the Java API:
String[] f(String[] first, String[] second) { List both = new ArrayList(first.length + second.length); Collections.addAll(both, first); Collections.addAll(both, second); return both.toArray(new String[both.size()]); }