double str = weight * distance * 250;
方法一:
System.out.println(String.format("%20.0f", str));
方法二:
DecimalFormat format = (DecimalFormat) NumberFormat.getPercentInstance(); // 取得一个模板
format.applyPattern("#####0"); // 前面是非数字,如果不是数字则0补充
String temp = format.format(str); // 格式化
System.out.println(temp);// 这样就变成字符串了,不需要科学计数法了