I tried the following program but it doesn't print what it should. I'm sure that the way I check the array is correct but when I put it in a "if" tester the program doesn't give me results
import java.util.Arrays;
public class 3Dmatrix {
public static void main(String[] args) {
int [][][] cube;
cube = new int [2][2][2];
cube [0][0][0] = 4;
cube [0][0][1] = 2;
if (cube [0] [0] == new int[]{4, 2}) {
System.out.println("cat");
}
}
}