编程小案例

1、类型转换,double->Double->四舍五入->long->Long->int

double d= scanner.nextDouble();
Double dd = (Double)d;
long i = Math.round(dd);
Long i1 = (Long)i;
int i2 = i1.intvalue();
        

 

posted @ 2021-11-25 15:48  上天安排的最大嘛!  阅读(60)  评论(0编辑  收藏  举报