I've written code that populates a multidimensional array of the correct length with sub-arrays filled with the correct number of nulls, but apparently that's not what's meant by "In the main(String[]) method, initialize and fill the two-dimensional array as outlined in the task conditions". Is this asking me to then create a multidimensional String array and display that?
package en.codegym.task.pro.task05.task0511;
import java.util.Scanner;
/*
Creating a two-dimensional array
*/
public class Solution {
public static int[][] multiArray;
public static void main(String[] args) {
//write your code here
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int[][] multiArray = new int[n][];
for (int i=0; i<n; i++) {
multiArray[i] = new int[input.nextInt()];
}
}
}