一直错啊。。。。。找不到原因

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

Annihilan

2019-01-26 16:24

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

        

        

}

}


写回答 关注

5回答

  • 慕少2098508
    2019-02-16 10:37:02

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

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

        System.out.println(three-=one);

        System.out.println(three*=one);

        System.out.println(three/=one);

        System.out.println(three%=one);  


  • 慕前端1329497
    2019-02-15 19:34:07

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

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

    的吧

  • Superme辰尘
    2019-02-04 06:02:26

    你的符号全是错了,改一下吧

  • 慕粉5374673
    2019-02-02 09:53:31

    多了一个等于号

  • 慕盖茨7383975
    2019-01-26 19:10:52

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

            

            

    }

    }


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

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

1165552 学习 · 17587 问题

查看课程

相似问题