为了账号安全,请及时绑定邮箱和手机立即绑定

Java中的赋值运算符


public class HelloWorld{

    public static void main(String[] args) {

   int one = 10 ;

        int two = 20 ;

        int three = 0 ;

        three = one+two;

        three += one;

        three -= one;

        three *= one;

        three /= one;

        three %= one;

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

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

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

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

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

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

        

        

        

        

        

        

        

        

        

        

        

    

}

}

为什么等于0 而且还能下一章节

正在回答

1 回答

这一节你好像答案是错的也可以前往下一节
0 回复 有任何疑惑可以回复我~
#1

慕UI6028893 提问者

是啊,什么问题?
2017-12-27 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Java入门第一季(IDEA工具)升级版
  • 参与学习       1162695    人
  • 解答问题       17548    个

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

进入课程

Java中的赋值运算符

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信