import java.math.BigDecimal;
public class DoubleToString
{
public static void main(String[] args)
{
double value = 1111111111;
System.out.println(value);
BigDecimal bigDecimal = new BigDecimal(value);
//Returns a string representation of this double without an exponent field
System.out.println(bigDecimal.toPlainString());
}
}
Wednesday, December 24, 2008
Subscribe to:
Post Comments (Atom)
Thanks for this solution. I was troubled with this issue for ages.
ReplyDelete