I have 2d array called myarr[3][3] and I want to to get myarr[0][0], myarr[0][1], and myarr[0][2] in another 1d array called arr1[3]. The same for myarr[1][0], myarr[1][1], and myarr[1][2] in another 1d array called arr2[3], and so on.
How can I do something like that in Java?
I have tried to use for loop but I stopped and couldn't know what to write inside it.
for(int i=0 ; i<3 ; i++){
for(int j=0 ; j<3 ; j++){
//what can i write here
}
}