Answers for "2d array 3 row 3 columb"

1

Index through 2d array

int[][]x;//define
for(int i=0;i<x.length;i++){
  for(int j=0;j<x[i].length;j++){
    //dp something with x[i][j]
  }
}
Posted by: Guest on November-07-2020
1

Index through 2d array

int[][]x;//define
for(int []y:x){
  for(int a:y){
    //do something with a
  }
}
Posted by: Guest on November-07-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language