File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Decimal Points Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Decimal Points" Watch "Decimal Points" New topic
Author

Decimal Points

Noorulain Khan
Greenhorn

Joined: Jul 31, 2001
Posts: 28
Could anyone inform me
How to restrict the decimal points to 4
like
I get some number through random method
like 0.000000000000
made it 1.000000000000 by multiplying etc..
but how to restrict the decimal points like
1.0000
Please help me.
Noorulain
:roll:
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Sounds like a job for...
java.text.DecimalFormat!

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Decimal Points
 
Similar Threads
"DecimalFormat"
Packed decimal conversion - Java
Javascript for decimal places restriction
Restricting the number of floating point digits
Mistake in Calculation of Percentage