I want to convert exponential to decimal. e.g. 1.234E3
to 1234
.
try the following
long l;
double d; //It holds the double value.such as 1.234E3
l=Double.valueOf(time_d).longValue();
you get the decimal value in the variable l.
You can do:
BigDecimal
.valueOf(value)
.setScale(decimalLimit, RoundingMode.HALF_UP)
.toPlainString()
How about BigDecimal.valueOf(doubleToFormat).toPlainString()