Ans. Object[] combined = new Object[first.length second.length];
System.arraycopy(first, 0, combined, 0, first.length);
System.arraycopy(second, 0, combined, first.length, second.length);
-- OR --
Object[] combined = Stream.concat(Arrays.stream(first), Arrays.stream(second)).toArray(); |