Two Laptop Bag*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Formatter question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Formatter question" Watch "Formatter question" New topic
Author

Formatter question

Gabriela Rios
Ranch Hand

Joined: Feb 27, 2008
Posts: 32
In K & B at the end of chapter 6


Output

> (123)<
>012,345<
>+12345 <
>false + -123<

I don't understand why >012,345<. Could you tell me why the comma is in that position. By Default?? If I don't specified the precision. it uses 3?
Daniel Del Moral
Ranch Hand

Joined: May 24, 2008
Posts: 32
It's a comma for grouping thousands, not decimals. That's might be confusing you. It's this kind of comma:

123,456.78 or
1,234,567.89
[ May 25, 2008: Message edited by: Daniel Del Moral ]

SCJP 5, SCWCD 5
Gabriela Rios
Ranch Hand

Joined: Feb 27, 2008
Posts: 32
Oh. You're right. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Formatter question