Все працює коректно (resultArray заповнений від 0 до 19), але остання умова не проходить
package ua.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) {
//напишіть тут ваш код
int len = firstArray.length+secondArray.length;
resultArray = new int [len];
for (int i = 0; i < resultArray.length; i++) {
if (i < 10) resultArray[i] = firstArray[i];
else resultArray[i] = secondArray[i-10];
System.out.println(resultArray[i]);
}
}
}