This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number Format

 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Winston Gutkowski
Bartender
Pie
Posts: 10417
63
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic