Help is greatly appreciated..
package com.codegym.task.task10.task1015;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
/*
Array of string lists
*/
public class Solution {
public static void main(String[] args) {
ArrayList<String>[] arrayOfStringList = createList();
printList(arrayOfStringList);
}
public static ArrayList<String>[] createList() {
ArrayList<String> list1 = new ArrayList<String>(Arrays.asList("asd", "acf", "afrt"));
ArrayList<String> list2 = new ArrayList<String>(Arrays.asList("df", "fdgz", "hzuj"));
ArrayList[] array = new ArrayList[]{list1, list2};
return array;
}
public static void printList(ArrayList<String>[] arrayOfStringList) {
for (ArrayList<String> list : arrayOfStringList) {
for (String s : list) {
System.out.println(s);
}
}
}
}