object 转换long

        double a = 345.0;
        Object b = a;
        NumberFormat n=NumberFormat.getInstance(); 
        n.setParseIntegerOnly(true);
        String d=n.format(b);
        long c = Long.parseLong(d);
原文地址:https://www.cnblogs.com/liuxiuhao/p/2807014.html