This a question from one of the mock exams.
Please go through the code...
What will be the result of compiling and running the given program?
Select one correct answer.
1. class Q55
2. {
3. public static void main(
String[] args)
4. {
5. int[] a={11,12,13,14};
6. int[] b={0,1,2,3};
7. System.out.println(a[(a=b)[3]]);
8. }
9. }
1. Compile time error at line number 7.
2. Runtime error at line number 7.
3. Program will compile correctly and print 3 when executed.
4. Program will compile correctly and print 14 when executed.
The answer given is 4.
Can any one explain me how 14 is the output.
Thanks in advance.