compound-operator

Automatically catching the use of =+ rather than += in Java

I have this horrible habit of typing the below and not catching it until well into testing: int i = 1; int j = 2; i =+ j; //i equals 2, not 3 as intended; assign only, + is unary and works on the j The correct version, of course, would be int i = 1; int j = 2; i += j; //i equals 3, as intended with additive & assignment compound o...

Java: += equivalence

Super quick question to refresh my mind: Is: x -= y; equivalent to: x = x - y; Thanks! ...