Meaning of *= in Java

后端 未结 4 1747
孤城傲影
孤城傲影 2021-01-20 21:00

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

For example: density *= invertedRatio;

I am not familiar with the star-

4条回答
  •  臣服心动
    2021-01-20 21:13

    Just like Da said, it's short for density = density * invertedRatio; - it's nothing Android specific, it's standard Java. You will find this (and similar operators) in many languages with a C-like syntax.

提交回复
热议问题