compound-operator在Java中自动捕获= +而不是+ =的使用 我有一个可怕的习惯,就是输入下面的内容,直到进行测试才发现它: int i = 1; int j = 2; i =+ j; //i equals 2, not 3 as intended; assign only, + is unary and works on the j 当然,正确的版本是 int i = 1; int j = 2; i += j;……继续阅读 »