I\'m trying to convert a nested list into a 2d array.
List> list = new ArrayList<>(); list.add(Arrays.asList(\"a\", \"b\", \"
This is the best and most efficient way to convert 2d list to 2d array;
List> list2d = new ArrayList<>(); Integer[][] array2d; array2d = list2d.stream().map(x->x.toArray(new Integer[x.size()])).toArray(Integer[][]::new);