• + 0 comments

    In java 8:

    int[] a = new int[n]; for (int i =0; i < n; i++) { a[i] = scan.nextInt(); }