📜  += Java 代码示例中的运算符强制转换

📅  最后修改于: 2022-03-11 14:52:43.145000             🧑  作者: Mango

代码示例1
int x = 0;
    x += 1.1;    // just fine; hidden cast, x == 1 after assignment
    x = x + 1.1; // won't compile! 'cannot convert from double to int'