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
you can try use decimalformat
float f = 9.0e-4f; decimalformat df = new decimalformat("#"); df.setmaximumfractiondigits(8); system.out.println(df.format(f));
Comments
Post a Comment