Почему? В консоль выводит от 0 до 19, всё как в условии, всё скопировал. Так почему не даёт завершить?
package com.javarush.task.pro.task05.task0504;
/*
Объединяем массивы
*/
public class Solution {
public static int[] firstArray = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
public static int[] secondArray = new int[]{10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
public static int[] resultArray;
public static void main(String[] args) {
//напишите тут ваш код
resultArray = new int [20];
System.arraycopy(firstArray,0,resultArray,0,10);
System.arraycopy(secondArray,0,resultArray,10,10);
for (int i = 0; i < resultArray.length; i++) {
System.out.print(resultArray[i] + ", ");
}
}
}