Can you explain to me the output of this Java code?
int a=5,i; i=++a + ++a + a++; i=a++ + ++a + ++a; a=++a + ++a + a++; System.out.println(a); System.out.p
In the above example
int a = 5,i; i=++a + ++a + a++; //Ans: i = 6 + 7 + 7 = 20 then a = 8 i=a++ + ++a + ++a; //Ans: i = 8 + 10 + 11 = 29 then a = 11 a=++a + ++a + a++; //Ans: a = 12 + 13 + 13 = 38 System.out.println(a); //Ans: a = 38 System.out.println(i); //Ans: i = 29