首页 > 学院 > 开发设计 > 正文

BigDecimal 元转分

2019-11-08 01:04:51
字体:
来源:转载
供稿:网友
/**	 * BigDecimal 元转分	 * 	 */	@Test	public void test11(){		BigDecimal b=new BigDecimal("100.01");				BigDecimal a=b.multiply(new BigDecimal(100));//乘以100(单位:分)		System.out.PRintln(b.intValue());		System.out.println(b);				System.out.println(a.intValue());		System.out.println(a);			}

打印结果

100100.011000110001.00


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表