You can round a double using the setScale() method of BigDecimal class. This method is vlaid after Java 1.1. An example of doing this is shown below:
import java.math.*; |
This blog is meant for my personal reference and keeping track of what I have learnt. Most articles are found through search engines, if you are the author of the article and would like to remove from this blog, please contact me.
import java.math.*; |
No comments:
Post a Comment