Java Array Merge

    public static void main(String[] args) {

        int[] x = {1, 2, 3};
        int[] y = {4, 5, 6};
        int[] merge = new int[x.length + y.length];

        for (int i = 0; i < x.length; i++) {
            merge[i] += x[i];
        }

        for (int i = 0; i < y.length; i++) {
            merge[x.length + i] += y[i];
        }

        System.out.println(Arrays.toString(merge));
    }
Chathumal Sangeeth