説明
変数から定数または変数の引き算を行う略記法です。
構文
x -= y; // equivalent to the expression x = x - y;
x | int、float、double、byte、short、long |
y | int、float、double、byte、short、long |
コード例
x = 20; x -= 2; // x now contains 18
変数から定数または変数の引き算を行う略記法です。
x -= y; // equivalent to the expression x = x - y;
x | int、float、double、byte、short、long |
y | int、float、double、byte、short、long |
x = 20; x -= 2; // x now contains 18