class Test{
public static void main(String[ ] args){
int[] a = { 1, 2, 3, 4 };
int[] b = { 2, 3, 1, 0 };
System.out.println( a [ (a = b)[3] ] );
}
}
What will it print when compiled and run ?
When I ran on my system it prints: 2
So can some one please explain, why in Test it is given as 1.
What I understood is that, array b is assigned to a, so a [ (a = b)[3] ] is accessing { 2, 3, 1, 0 }.
![Question :?:](./images/smilies/icon_question.gif)