Q:

Confusion in printf() output

I am doing some sample practice for formatting string using format() and printf() methods.
Here is an example, whose output i am confused about please help.
int i2= 12345;
//Total length of the argument should be 7 and pad with zeros
System.out.printf(">%0,7d< \N",i2);

The output is
>012,345<

If we see, the length of the argument is six. But does the delimiter is also counted in 
its length. If not then the output should have been this according to me.
>001,2345<

Please help in clarifying this doubt.

A:

The javadoc page for Formatter does not mention any special treatment for grouping separators when interpreting the width, it just talks about the number of characters:  

The optional width is a non-negative decimal integer indicating the minimum number of characters to be written to the output.

