当前页面: 开发资料首页 → J2SE 专题 → 科学计数法5,123.89 如何格式化回5123。89(除了用replace外)?
科学计数法5,123.89 如何格式化回5123。89(除了用replace外)?
摘要: 科学计数法5,123.89 如何格式化回5123。89(除了用replace外)?
NumberFormat n = NumberFormat.getNumberInstance();
try{
Number m = n.parse("5,123.89");
double x = m.doubleValue();
System.out.println(x);
}catch(Exception e){
e.printStackTrace();
}
mark