i want to prevent Exponential in my floating value in java -


i want prevent exponential in floating value in java

 float datapoint=9.0e-4;            want print this"9.0" only
please 1 help!!

you can try use decimalformat

float f = 9.0e-4f; decimalformat df = new decimalformat("#"); df.setmaximumfractiondigits(8); system.out.println(df.format(f)); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -