For school work I need to write a constructor for a class that contains a 2-dimensional array of integers. The constructor copies a passed in two-dimensional array. Below is the code I have so far. The current issue I have is how to initialize the array when the "column" size of the passed in array is unknow. The issue I think I am having is when creating and initializing the array. The length of the inner and out array is unknown.
 public IntMatrix (int[][] array)
    {_matrix = new int [array.length][array.length-1].length];
    for (int i = 0; i < array.length; i++) {
        for(int j=0; j < array[i].length; j++)
        _matrix[i][j]=array[i][j];
    }
}
 
     
    