android round float to 2 decimal places code example Example: android round double to 2 decimal String.format("%.2f", d)