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

为什么运行失败??


   three=one+two;

        System.out.println("three= one + two==>"+three);

        three += one;

        System.out.println("three += one ==>"+three);

        three -= one;

        System.out.println("three -= one ==>"+three);

        three *= one;

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

        three /= one;

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

        three %= one;

        System.out.println("three %= one ==>"+three);

    }

}        


提问者:qq_慕圣9158403 2019-08-07 17:46

个回答

  • alisleepy
    2019-08-19 20:10:28

    public class HelloWorld{    public static void main(String[] args) {	    int one = 10 ;        int two = 20 ;        int three = 0 ;        int a = one + two;        System.out.println("three = one + two ==>" + a);	}}


  • 你们真闲啊
    2019-08-07 19:27:13

    https://img1.mukewang.com/5d4ab5770001784e10170747.jpg

    你这个好像是对的=-=

  • qq_慕圣9158403
    2019-08-07 19:22:28

    public class HelloWorld{    public static void main(String[] args) {	    int one = 10 ;        int two = 20 ;        int three = 0 ;        three=one+two;        System.out.println("three= one + two==>"+three);        three += one;        System.out.println("three += one ==>"+three);        three -= one;        System.out.println("three -= one ==>"+three);        three *= one;        System.out.println("three *= one ==>"+three);        three /= one;        System.out.println("three /= one ==>"+three);        three %= one;        System.out.println("three %= one ==>"+three);    }}


  • 你们真闲啊
    2019-08-07 19:09:18

    全部代码看看啊,贴这一段咋看啊?