sunny123456

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

java BigDecimal 转换成 Long数据类型 b.longValue()

 

 

  //bigDecimal  转换成  Long类型
    public static void test(){
        BigDecimal b = new BigDecimal(12);
        Long c = b.longValue();
        System.out.println(c+"的数据类型是"+c.getClass().getName());
    }
https://blog.csdn.net/liuming690452074/article/details/109694184
posted on 2022-10-27 12:12  sunny123456  阅读(1165)  评论(0编辑  收藏  举报