Hi, It seems a trivial issue but I am not able to resolve it. I am getting a very big integer value from database which maps to float/double value in Java. As the value can exceed 24 characters hence Java long is ruled out. My problem is to display the value as it is with out any exponential and without any rounding of. As of now I am using DecimalFormat but still the values are rounded off. Ex: My value in database is 956000000000000000000024. What I am getting is 956000000000000000000000. Can somebody help me out on this. Regards, Vijay
I agree with Peter - the data you need is getting lost in during the conversion to double, before you make any attempt to print the output, no matter how you format it. However if the number is fundamentally an integer, then BigInteger is a better fit than BigDecimal. Either one will work, but BigDecimal is needlessly slow if there's never a fractional value that needs to be maintained.