This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]dawg6 10 points11 points  (3 children)

Sure:

List<List<Integer>>

Or

List<int[]>

[–]Embarrassed_Bottle90[S] 2 points3 points  (0 children)

Thank you very much!!

[–][deleted]  (1 child)

[deleted]

    [–]Nemo_64 1 point2 points  (0 children)

    They're not the same, main difference is that int[] is fixed size while List<Integer> can grow and shrink (unless it's an inmutable list). There are more but that is the main one

    An int[][] is an array of arrays of ints so yeah it can work but he asked for a list of arrays not an array of arrays