aspose file tools*
The moose likes Beginning Java and the fly likes Number Format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Number Format" Watch "Number Format" New topic
Author

Number Format

Mauro Trevigno
Ranch Hand

Joined: Aug 27, 2012
Posts: 39

Hi guys,

What it means the pipes in this case?

Also the number 2 means that im capable to have only 2 numbers before the point ?

And the 4 means four numbers after the point ?




Thank You

Regards,
M
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Did you try to run it?
Pipes are part of the string printed to standard output, they have nothing to do with format of the number printed.


The quieter you are, the more you are able to hear.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7052
    
  16

Mauro Trevigno wrote:What it means the pipes in this case?

Exactly what it looks like.

Also the number 2 means that im capable to have only 2 numbers before the point ?

No, it means "at least 2 numbers before the point" - and don't forget that this is a formatting specification.

And the 4 means four numbers after the point ?

Yup.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Number Format
 
Similar Threads
signed bits...
Math.random
Floating Point Arithmetic: Help with denormalized numbers
ceil(),round()
Abundant Numbers