类型转换
以下内容连在一起看
图一
图二
图三
以下内容连着看
图一
package tk.xiaolanchong.excel;
public class Demo02 {
public static void main(String[] args) {
int money = 10_0000_0000;
int years = 20;
int total = money * years;
long total2 = money * years;//还没有转换的时候以及溢出
long total3 = money *( (long)years);//强转
System.out.println(total3);
}
}