System.out.printf("45%2$b%3$+04d",978,654,321,111);
%2$b - print second argument as a boolean
second argument is 654.
whenever we use 'b' as conversion character,
If the argument arg is null, then the result is "false". If arg is a boolean or Boolean, then the result is the
string returned by String.valueOf(). Otherwise, the result is "true".
As 654 is non null value, it will print true!
Refer to the
java doc of Formatter class for more information!