Lists can be multidimensional also:

  1. 2-Dimensional:

List<List<Integer>> nestList = new List<List<Integer>>();

  1.  3-Dimensional:

List<List<List<Integer>>> nestList = new List<List<List<Integer>>>();

Note: SOQL queries also returns list of records. 

Our Recent Blog

Share This Post