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

java - Null response to php query in android, even though php works properly -

node.js - Using Node without global install -

php - CakePHP HttpSockets send array of paramms -