Basically I have the following function where I need to convert ArrayList to List
public List<List<Integer>> somefunc(int[] nums) {
ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();
// logic
return a;
}
How can I convert this ArrayList<ArrayList> to List<List>?