在java 中怎么把double类型转成 int类型

2025-04-17 17:23:33
推荐回答(1个)
回答1:

int numberInt ;
double numberDouble;
numberInt= (int) numberDouble;
这种方法会丢失小数点后面的值