What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.
1. public class ShortCkt {
2.public static void main(
String args[]) {
3.int i = 0;
4.boolean t = true;
5.boolean f = false, b;
6.b = (t && ((i++) == 0));
7.b = (f && ((i+=2) > 0));
8.System.out.println(i);
9.}
10. }
A)0
B)1
C)2
D)3
why the answer is b? and why (line 7) second assignment to variable b, the expression (i+=2) does not get evaluated? please explain, thanks..