Java: Float Formatting depends on Locale [duplicate] January 2, 2024 by Tarik Try using String.format(Locale.US, "%f", floatValue) for just setting locale used during formatting.