In Java, the *=
is called a multiplication compound assignment operator.
It's a shortcut for
density = density * invertedRatio;
Same abbreviations are possible e.g. for:
String x = "hello "; x += "world" // results in "hello world"
int y = 100; y -= 42; // results in y == 58
and so on.