问答详情
源自:3-3 Java中的赋值运算符

three / =one 计算不了


这是结果

three = one + two ==> 30
three += one ==> 40
three -= one ==> 30
three *= one ==> 300
three /= one ==> 300
three %= one ==> 0

提问者:慕无忌9059796 2015-04-04 11:23

个回答

  • lymo
    2015-04-04 13:02:19

    System.out.println("three *= one ==> "+(three*=one)); //three=300
    three*=one; //three=3000
    three /= one; //three=300
    System.out.println("three /= one ==> "+ three );

    虽然没看懂这是要干嘛,不过代码跟结果显示的一样。