4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by mKorbel
0

Because mathematically, 10.1 is the same as 10.10 which is the same as 10.100 and so on. You might want to elaborate a bit on the context here to get useful answers.

0

If your goal is to represent a number with n significant decimals, you should use BigDecimal instead of Double.

If it's simply a formating issue, have a look at NumberFormat and its subclasses (DecimalFormat).

Edited by SasseMan: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.