package Demo;
public class Deam {
//运算规则 先将运算集统一成该运算中最高的数据类型在转换
//类型转换:byte,short,char,用运算符以后自动转型为int类型
public static void main(String[] args) {
//二元预算符 a+b
// ctrl + d 代表直接复制到下一行
int a = 1;
int b = 6;
int c = 8;
int d = 64;
System.out.println("金额"+a+b);
System.out.println(a-b);
System.out.println(c*d);
System.out.println(d/c);
System.out.println((double)c/d);
int a1 = 256;
long b1 = 439485436L;
short c1 = 1543;
byte d1 = 12;
System.out.println(a1+b1); // long类型
System.out.println(b1-c1); // long类型
System.out.println(c1+d1); // int类型
System.out.println(d1+c1+b1); //long类型
//System.out.println((double)c/d); 默认都是int类型如果需要转成double类型就在前面加个double。
}
}