Format Decimal Values Correctly Using Java

If you happen to come across a decimal value in Java e.g. 0.0008689 but is displayed in a weird way like 8.689E-4, you can use this method to format it in a more readable display. Pretty useful when formatting currencies.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *