运算关系,自增自减_赋值

package Bao2;

public class day1 {
    public static void main(String[] args) {
        //二元运算
        int a = 10;
        int b = 20;
        int c = 30;
        int d = 30;
        System.out.println(a+b);
        System.out.println(a-b);
        System.out.println(a*b);
        System.out.println(a/(float)b);
        System.out.println("===================");

        long f = 122121212151561l;
        int e = 123;
        short g = 10;
        byte h = 8;
        System.out.println(f+e+g+h); //long
        System.out.println(e+g+h);   //int
        System.out.println((long)g+h);    //int
        System.out.println("===================");

        int a1 = 10;
        int a2 = 20;
        int a3 = 21;
        System.out.println(a1>a2);
        System.out.println(a1<a2);
        System.out.println(a1==a2);
        System.out.println(a1!=a2);
        System.out.println(a3%a1);
        System.out.println("===================");
        // ++  -- 自增,自减  一元运算
        int b1 = 1;
        int b2 = b1++;  //先赋值;执行完这行代码后,再加一
        int b3 = ++b1;  //先加一;再赋值
        //int b4 = b1++++++;
        System.out.println(b2);
        System.out.println(b3);
        //System.out.println(b4);

    }
}

运算关系,自增自减_自增_02