package diyi;
public class Demo4 {
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);
System.out.println(a-b);
System.out.println(a*b);
System.out.println(a/ (double)b);//结果为0.5,四舍五入取零,算之前要强转下,小数的话要强转成double
}
}
输出的结果是30
-10
200
0.5