I have been trying to make an array of integer arrays. I know that the outer array will have length N whilst every integer array within in only needs to hold two values.
Originally, I made an ArrayList with an Integer array:
int[] intArray = new int[2];
ArrayList<IntArray> outerArray = new ArrayList<>();
I then proceeded to just make an ArrayList of Integer within another ArrayList:
ArrayList<ArrayList<Integer>> outerArray = new ArrayList<>();
I'm looking for something that looks like this if N = 3 and a,b,c are integers:
{{a1, a2}, {b1, b2}, {c1, c2}}
int[][] array = int[n][2];? You can then access, for example,array[1][0]Integer[][]??