import java.util.*;
public class Main {
    //This method is complete. Do not change it.
    public static void main(String[] args) {
        Random r = new Random();
        r.setSeed(System.currentTimeMillis());
        int n = r.nextInt(6) + 1;
        List[]a = new ArrayList[1];
        makeLists(a);
        System.out.println(a.length);
        for(int i = 0; i < a.length; i++)
            System.out.println(a[i].toString());
    }
    private static void makeLists(List[] a) {
         for (int i=0; i<a.length; i++){
      List<Character> chars = new ArrayList<Character>();
      chars.add(0,'A');
      chars.add(1,'B');
      chars.add(2,'C');
      chars.add(3,'D');
      chars.add(4,'E');
      chars.add(5,'F');
      chars.add(6,'G');
      chars.add(7,'H');
      chars.add(8,'I');
      chars.add(9,'J');
      chars.add(10,'K');
      chars.add(11,'L');
      chars.add(12,'M');
      chars.add(13,'N');
      chars.add(14,'O');
      chars.add(15,'P');
      chars.add(16,'Q');
      chars.add(17,'R');
      chars.add(18,'S');
      chars.add(19,'T');
      chars.add(10,'U');
      chars.add(21,'V');
      chars.add(22,'W');
      chars.add(23,'X');
      chars.add(24,'Y');
      chars.add(25,'Z');
      a[i] = chars;
I have to print out the linked list where data for 0 is A, 1 is A and B, when I do this above I get an error message illegal position 0. I believe that I need a nested for loop to print this, but I am not sure where to even begin.
 
    