While I was browsing answers here, I read that
"Java does not have true 2-dimensional arrays; it has arrays of arrays, so x[rows][cols] is an array x of rows arrays of cols elements (i.e. x[rows] is an array of arrays)."
That seems like good news for me, as I want to create a single 1D array by copying a "row" from a 2D array. What is the correct syntax to call a specific array from P, my 2D array? Essentially:
new double[] row1 = P[row];
Or do I have to loop through the row I want to copy? I have tried the above code and several similar approaches. All receive an error of "Array dimension missing".
newat the beginning? Why do you think that should be there? (It shouldn't and is the cause of your error)newanything (it also means that any modifications you do inrow1will be also done inP[row]. If you were to create a copy that would not be the case.)