这哪里错了?

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

不忘初心彡

2018-07-06 22:50

初学java,不懂哪里错了

写回答 关注

4回答

  • 秋一思
    2018-07-08 19:36:36
    已采纳

    没错吧。。。。

  • 不忘初心彡
    2018-07-08 22:26:13

    不好意思,最底下多了两个大括号?

  • 秋一思
    2018-07-08 19:37:25

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

            


  • 不忘初心彡
    2018-07-06 22:53:47

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


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

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

1165172 学习 · 17581 问题

查看课程

相似问题