+ 3
what is wrong here how to do it correctly?
public class Program { public static void main(String[] args) { int[][]t = {{2,3,4},{4,5,6}}; for(int y:t) { System.out.println(y) ; } } }
1 Answer
+ 13
public class Program
{
public static void main(String[] args) {
int[][] t = {{2,3,4},{4,5,6}};
for(int[] y : t) {
for(int x : y) {
System.out.println(x);
}
}
}
}