为什么不能运行呢?

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

慕标1475918

2018-09-19 19:45

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 = onr + two==>"+ three);
        three+=one;
        System.out.println("three += one ==>" + three);
        three-=one;
        System.out.println("three -= one ==>" + three);
        three*=one;
        System.out.ptintln("three *= one ==>" + three);
        three/=one;
        System.out.println("three /= one ==>" + three);
        three%=one;
        System.out.println("three %= one ==>" + three);
        }
        }

写回答 关注

4回答

  • 洛辰m
    2018-09-28 16:35:29

    第7行one写错了,第13行println写错了,细心一点就好啦

  • 不成功不改名
    2018-09-27 19:12:40
    System.out.println("three = one + two ==>"+(three=one+two));        System.out.println("three += one ==>"+(three +=one));        System.out.println("three -= one ==>"+(three -=one));        System.out.println("three *= one ==>"+(three *=one));        System.out.println("three %= one ==>"+(three %=one));


  • 慕数据1269804
    2018-09-19 19:52:09

    还有你的第四个println也写错了呢,细心点哦,加油!

  • 慕数据1269804
    2018-09-19 19:48:25

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

    你的one写错了吧,改了试试

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

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

1163337 学习 · 17551 问题

查看课程

相似问题