Java赋值运算

来源:3-5 Java中的逻辑运算符

LVSIYANG

2016-10-05 02:39

编程题3-3答案

写回答 关注

1回答

  • 小蝎子訫圊小Q
    2016-10-05 03:50:55
    已采纳

    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环境搭建、工具使用、基础语法开始

1165172 学习 · 17581 问题

查看课程

相似问题