説明
ある変数と他の定数や変数との掛け算を行う場合の略記法です。
構文
x *= y; // equivalent to the expression x = x * y;
x | int、float、double、byte、short、long |
y | int、float、double、byte、short、long |
コード例
x = 2; x *= 2; // x now contains 4
ある変数と他の定数や変数との掛け算を行う場合の略記法です。
x *= y; // equivalent to the expression x = x * y;
x | int、float、double、byte、short、long |
y | int、float、double、byte、short、long |
x = 2; x *= 2; // x now contains 4