List<List<Integer>> outerList = new ArrayList<>(); List<Integer> innerList1 = new ArrayList<>(); List<Integer> innerList2 = new ArrayList<>(); outerList.add(innerList1); outerList.add(innerList2);