Space as grouping separator in printf

Posted by blekione on Stack Overflow See other posts from Stack Overflow or by blekione
Published on 2012-11-09T10:58:36Z Indexed on 2012/11/09 10:59 UTC
Read the original article Hit count: 139

Filed under:

I know how to use comma in printf as grouping separator to print value in format like 1,000,000.00

to print it that way I'm using command

System.out.printf ("%,.2f", value);

but how to use space as grouping separator to format value like 1 000 000.00

I tried to find solution but solutions with using DecimalFormat look at now to complicate for me (beginner level). Is there as easy way as in example with comma to do it?

© Stack Overflow or respective owner

Related posts about java