/**
 * @author Meowrain
 * @version 1.0
 */
package com.meowrain;
public class Main {
    public static void main(String[] args){
        int [] arr = {1,2,3};
        int [] arr1 = new int[arr.length + 1];
        arr1[arr1.length - 1] = 4;
        for (int i = 0; i < arr.length; i++) {
            arr1[i] = arr[i];
        }
        for (int i = 0; i < arr1.length; i++) {
            System.out.printf("%d ",arr1[i]);
        }
    }
}