publicclassDome1{publicstaticvoidmain(String[] args){//二元运算符// Ctrl + D :复制到下一行int a =10;int b =20;int c =25;int d =25;System.out.println(a+b);System.out.println(a-b);System.out.println(a*b);System.out.println(a/b);}
publicclassDome2{publicstaticvoidmain(String[] args){long a =123123123123123L;int b =123;short c =10;byte d =8;//不是Long类型,统统IntSystem.out.println(a+b+c+d);//LongSystem.out.println(b+c+d);//IntSystem.out.println(c+d);//Int}
publicclassDome3{publicstaticvoidmain(String[] args){//关系运算符返回的结果: 正确,错误 布尔值//ifint a =10;int b =20;int c =22;//取余,模运算System.out.println(c%a);// c / a 22 / 10 = 2.......2System.out.println(a>b);System.out.println(a<b);System.out.println(a==b);System.out.println(a!=b);}