open_in_new
content_copy
float myFloat = 2.001f; String formattedString = String.format("%.02f", myFloat);