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

这个代码为何显示错误

 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);


提问者:慕工程8308517 2025-02-26 08:47

个回答

  • qq_慕函数1277288
    6天前

    字符串和变量的链接符号是+ System.out.println(" three = one + two ==>"+three);