Сложное для усвоения задание... Подскажите. мб я условие не так понял?
ошибка : В методе main(String[]) инициализируй и заполни двухмерный массив согласно условию.
Тестовый запуск
5
1
7
5
9
3
0
0 0 0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0
package com.javarush.task.pro.task05.task0511;
import java.util.Scanner;
/*
Создаем двухмерный массив
*/
public class Solution {
public static int[][] multiArray;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[][] a1 = new int[N][];
if ( N > 0 ) {
for (int i = 0; i < a1.length; i++) {
int multiArray = sc.nextInt();
if (multiArray > 0 ) {
a1 [i] = new int [multiArray];
}
}
//for (int i = 0; i<a1.length; i++) {
// for (int j = 0; j < a1[i].length; j++) {
// System.out.print(a1[i][j] + " ");
// }
// System.out.println();
//}
}
}
}