Format for the default locale
import java.text.NumberFormat; public class Main { public static void main(String[] argv) throws Exception { String string = NumberFormat.getNumberInstance().format(-1234.56); System.out.println(string); } } //-1,234.56