When I have a two-dimensional matrix in java, but I only want to work with a certain row of that matrix respectively creating a new array that contains the contents of the matrix in that certain row, how would I accomplish that (with primitives)?
So, for example, we would write:
int matrix = new int;
Now we have a two-dimensional matrix with 10 rows and 10 columns. Assume that we fill the whole matrix with certain elements, and now, I wish to work only with the first row, meaning to define a new array that contains exactly the elements of the first row of the matrix.