包机制

 

 

package Operator;

import java.util.Date;
//导入这个包下所有的类!
import Operator.*;

public class Demo01 {
    public static void main(String[] args) {
        //二元运算符
        //ctrl + D:复制当前行到下一行
        int a = 10;
        int b = 20;
        int c = 25;
        int d = 25;
        System.out.println(a + b);//30
        System.out.println(a - b);//-10
        System.out.println(a * b);//200
        System.out.println(a / b);//0
        System.out.println(a / (double) b);//0.5

        //Date
    }
}

 

posted on 2022-07-01 08:12  一枚努力学习的小白  阅读(15)  评论(0编辑  收藏  举报