为什么运行失败??

来源:3-3 Java中的赋值运算符

qq_慕圣9158403

2019-08-07 17:46


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

    }

}        


写回答 关注

4回答

  • 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_慕圣9...

    emm那我不知道了

    2019-08-10 22:05:41

    共 2 条回复 >

  • 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:26:21

    共 1 条回复 >

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

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

    qq_慕圣9...

    前几行就是基本的那些

    2019-08-07 19:23:03

    共 1 条回复 >

Java入门第一季(IDEA工具)升级版

0基础萌新入门第一课,从Java环境搭建、工具使用、基础语法开始

1163409 学习 · 17551 问题

查看课程

相似问题