Given the code fragment:
int n [] [] = {{1, 3}, {2, 3}};
for (int i = n.length-1; i >= 0; i—) {
for (int y : n[i]) {
System.out.print (y) ;
}
}
What is the result?
A. 1324
B. 413
C. 3142
D. 4231
Given the code fragment:
int n [] [] = {{1, 3}, {2, 3}};
for (int i = n.length-1; i >= 0; i—) {
for (int y : n[i]) {
System.out.print (y) ;
}
}
What is the result?
A. 1324
B. 413
C. 3142
D. 4231
2313 is Output
public static void main(String[] args) {
int n[][]={{1,3},{2,3}};
System.out.println(n.length);//2
for(int i=n.length-1;i>=0 ;i–){
for(int y :n[i]){
System.out.print(y);
}
}
}
the result 2313
The answer is 2313 but options do not hove it