aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Rounding off. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Rounding off." Watch "Rounding off." New topic
Author

Rounding off.

akhil poddar
Greenhorn

Joined: Aug 23, 2001
Posts: 4
Suppose we are calculating Percentage of a student say X.
X gets 68.4467%. How can we round this up to 68.45%.
------------------
Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
By using the java.math.BigDecimal class .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Rounding off.