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