I want this code to print Pascal triangle and I need to have the output of generate() to be `List<List<Integer>>` I have been struggling too much mostly because I am not comfortable with iterating over and assigning the values to list of list. Can you help me to figure the solution? I am not looking for fancy solution!

```
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PascalTriangle {

    public static long biCoeff(int n, int k) {
        if (n==k) {
            return (long) 1;
        }
        if (n==0) {
            return (long) n;
        }

        return (biCoeff(n-1, k-1)+biCoeff(n-1,k));
    }

    public static List<List<Integer>> generate(int numRows) {
        List<List<Integer>> l = new ArrayList<>();
        for (int i=0; i<numRows; i++) {
            for (int j=0; j<l.get(i).size(); j++) {
                l.get(i).add((int) biCoeff(numRows, j));
            }

       }
       return l;
    }

    public static void main(String[] args){
        generate(5);
    }
}

```

error:

```
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:635)
    at java.util.ArrayList.get(ArrayList.java:411)
    at PascalTriangle.generate(PascalTriangle.java:25)
    at PascalTriangle.main(PascalTriangle.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Process finished with exit code 1                                                                                             

```