В компиляторе выдает ошибку Exception in thread "main" java.lang.: 24 вот код:
package com.company;
import java.util.Arrays;
class Domashka4 {
public static void main(String[] args) {
int[] num1 = new int[]{1, 1, 1, 1, 0, 0, 1, 0, 0, 0};
System.out.print("Задание №1: ");
System.out.print(Arrays.toString(num1));
System.out.print(" - ");
for (int i = 0; i < num1.length; i++) {
if (num1[i] == 1) num1[i] = 0;
else num1[i] = 1;
}
System.out.print(Arrays.toString(num1));
System.out.println(" ");
System.out.print("Задание №2: ");
int[] num2 = new int[8];
int j = 0;
for (int i = 0; i < num2.length; i++, j = j + 3) {
num2[i] = j;
}
System.out.println(Arrays.toString(num2));
System.out.println("Задание №3");
int[][] num3 = new int[1][1];
for (int q = 0; q < num3.length; q++) {
for (int k = 0, j2 = num3[q].length; k < num3[q].length; k++, j2--) {
if (q == j || q == (j2 - 1)) {
num3[q][j] = 1;
System.out.print(num3[q][j]);
}
}
System.out.print(" ");
}
}
}