The program below is giving the output 5 .
Now I know that the precedence of the [] operator is more than
the = operator but I have studied that one can change the order of precedence by applying small brackets ().Here alse we
have (arr=brr)[3] which means that arr=brr should be evaluated first and than [] operator and 3 should be the output.
Anyone plz clarify this.
class Testclass{
public static void main(
String argv[]){
int arr[] = {2,3,4,5};
int brr[] = {1,3,4,3};
System.out.println(arr[(arr=brr)[3]]);
}
}