Print floats with certain amount of decimal numbers


#1

Hello,

I am trying to print a float with two decimal symbols. How to do that?


#2

Use DecimalFormat


#3

"%.2f".format(value)


#4

is that returning “19.00” for values with 0 as the decimal part?


#5

Yes.