You can append the two arrays in two lines of code. String[] both = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, both, first.length, second.length); This is a fast and efficient solution and will work for primitive types as well as the two methods involved are overloaded. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.