■ "-" Left justify this argument
■ "+" Include a sign (+ or -) with this argument
■ "0" Pad this argument with zeroes
■ "," Use locale-specific grouping separators (i.e., the comma in 123,456)
■ "(" Enclose negative numbers in parentheses
can anyone explain all these things....specially the padding thing or give me a link
It is explained quite well on page 508 of the K&B book. Its also explained on the Formatter class docs. Try to create some programs to experiment with the things...
why is b3 false....
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".
Hi Ankur, I think anything other than true is considered false by Boolean(String) constructor.
So when toString() method gets called for Boolean constructor it returns the "ankur' (in your case). So apart from true anything passed as string to considered as a false