public static String NonScientificNotation(String num) { Pattern pattern = Pattern.compile("-?[0-9]*.[0-9]*E[0-9]*"); Matcher match = null; match = pattern.matcher(num); if(match.matches()) { BigDecimal decimal = new BigDecimal(num); num = decimal.toPlainString(); } return num; }
用上述方法即可。