Different output for b = + 1 in java
I have executed the following program
int b = 0;
b=+1;
System.out.println(b);
b=+1;
System.out.println(b);
b=+1;
System.out.println(b);
and got the output as 1 always. Why is b incremented in the first increment, and why isn't it incremented in the second and third increments of the operation?
+3
source to share
3 answers