public static void main(String[] args) {
double value=9.100001;
//保留两位小数
String format = String.format("%.2f", value);
//去除多余的0
String strValue = new BigDecimal(format).stripTrailingZeros().toPlainString();
System.out.println("strValue = " + strValue);
}