File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Formatter question" Watch "Formatter question" New topic

Formatter question

Gabriela Rios
Ranch Hand

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


> (123)<
>+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
[ May 25, 2008: Message edited by: Daniel Del Moral ]

Gabriela Rios
Ranch Hand

Joined: Feb 27, 2008
Posts: 32
Oh. You're right. Thank you.
subject: Formatter question
It's not a secret anymore!