package test;
import java.math.BigDecimal;
import java.text.DecimalFormat;
public class A {
public static void main(String[] args) {
// TODO Auto-generated method stub
BigDecimal a = new BigDecimal("641825.59");
System.out.println(a.floatValue());
DecimalFormat df1 = new DecimalFormat("#.##");
System.out.println(df1.format(a));
}
}
标签:java,BigDecimal,floatValue,System,丢失,import,DecimalFormat,out From: https://blog.51cto.com/u_16080829/6209471