Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Decimal Precision

 
RB Pavan Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to print a float variable for a precision of four decimals always . I mean if I assign a value of 0 it should print it as 0.0000
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This forum is intended for questions and comments about this web site, www.javaranch.com. It is not for questions about the Java language - that's what all our other forums are for.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic