Hi, I came across the code that my friend sent me, and it’s hard for me to solve the second part of the print instruction. a[3]is 4, which is in line 0 of the column 2 ( b[0][2]), but for some reason a[2], which is equal to 53, which is true for b[2][1] == 43??? (The code prints "true true".)
class Ex1{
public static void main(String[] args) {
int a[] = { 1,2,053,4};
int b[][] = { {1,2,4} , {2,2,1},{0,43,2}};
System.out.print(a[3]==b[0][2] );
System.out.print(" " + (a[2]==b[2][1]));
}
}
source
share