Hi, can't find my error.
on both IDE task won't compile.
on Intelli J return statement on line 22 creates a green lines.
can't find symbol list/List lines 24-29.
Thanks
package com.codegym.task.task09.task0926;
import java.util.ArrayList;
/*
List of number arrays
*/
public class Solution {
public static void main(String[] args) {
ArrayList<int[]> list = createList();
printList(list);
}
public static ArrayList<int[]> createList() {
int[] five = {1, 2, 3, 4, 5};
int[] two = {6, 7};
int[] four = {8, 9, 10, 11};
int[] seven = {12, 13, 14, 15, 16, 17, 18};
int[] zero = {0};
return
list.add(0, 5);
list.add(1, 2);
list.add(2, 4);
list.add(3, 7);
list.add(4, 0);
return list;
}
public static void printList(ArrayList<int[]> list) {
for (int[] array : list) {
for (int x : array) {
System.out.println(x);
}
}
}
}