javanotation

Meaning of *= in Java


I see an unfamiliar notation in the Android source code: *=

For example: density *= invertedRatio;

I am not familiar with the star-equals notation. Can somebody explain it?


Solution

  • density *= invertedRatio; is a shortened version of density = density * invertedRatio;

    This notation comes from C.