How to Avoid Scientific Notation in Double? How to Avoid Scientific Notation in Double? android android

How to Avoid Scientific Notation in Double?


Check answer here. You can write

moneyToGet.setText(String.format("%.0f", priceValue));


You can try this DecimalFormat

DecimalFormat decimalFormatter = new DecimalFormat("############");number.setText(decimalFormatter.format(Double.parseDouble(result)));


I would suggest using BigDecimals instead of doubles. That way you will have a more precise control over your calculation precision. Also you can get a non-scientific String using BigDecimal.toPlainString().