Concatenate two arrays in Java is quite simple you can use single liner solution from the Apache Commons Lang library.
ArrayUtils.addAll(T[], T...)
For example if you have two array firstArray and secondArray, you would have code like below for adding two arrays into combineArray
String[] combineArray = (String[])ArrayUtils.addAll(firstArray, secondArray);
0 Comment(s)