+ 9
How will you apply the enhanced for loop for 2d array ?
2 Antworten
+ 4
Maybe you can do it like this
for(int[] k: myArr){
for(int l: k){
System.out.print(l+" ");
}
System.out.println("");
}
+ 3
I generally try to stay away from enhanced for loops, but maybe one inside another?