This is a convenient shorthand to perform subtraction of a constant or a variable from a variable.
x -= y; // equivalent to the expression x = x - y;
x: variable. Allowed data types: int, float, double, byte, short, long.y: variable or constant. Allowed data types: int, float, double, byte, short, long. x = 20;
x -= 2; // x now contains 18