加法(+)
int a = 10,b = 20;
System.out.println(a+b);//10 + 20 = 30
//如果一个数字加一个字符串则会拼接;
int c =123;
String d = "hello";
System.out.println(c + d);//123 + hello = 123hello
减法(-)
int a = 20, b = 10;
System.out.println(a - b); // 20 - 10 = 10
乘法(*)
加法(+)
int a = 10,b = 20;
System.out.println(a+b);//10 + 20 = 30
//如果一个数字加一个字符串则会拼接;
int c =123;
String d = "hello";
System.out.println(c + d);//123 + hello = 123hello
减法(-)
int a = 20, b = 10;
System.out.println(a - b); // 20 - 10 = 10
乘法(*)