double类型转换成int类型


public class test09 {
    public static void main(String[] args) {
        double a = 5000.44;
        double b = 100.12;
 
        double v = a / b;
        int i = new Double(v).intValue();
        System.out.println(i);
        System.out.println(v);
    }

posted @ 2020-05-11 19:49  那些年的代码  阅读(15547)  评论(0编辑  收藏  举报