int[][] a ={{1,2,},{3,4}};
First of all, Mind that in
Java array is Object so it can be cast to Object as well. Now lets see what happens after the assignment...
a[0] = {1, 2}
a[1] = {3, 4}
int[] b = (int[]) a[1];//line 1
After this line...
b[0] = 3
b[1] = 4
Object o1 = a;//line2
Here the whole array is converted to Object as I said before
int[][] a2 = (int[][]) o1;//line3
Here again the object converted to the array. Its alright because the object is holding a two dimensional array of int
int[] b2 = (int[])o1;//line4
this line will give a runtime exception because you cannot cast a two dimensional array into a one dimensional array
System.out.println(b[1]);
This line will print 4