文字列から BigDecimal を作成しようとしています。理由は聞かないでください。ただ必要なだけです。これは私のコードです:
Double theDouble = new Double(".3");
System.out.println("The Double: " + theDouble.toString());
BigDecimal theBigDecimal = new BigDecimal(theDouble);
System.out.println("The Big: " + theBigDecimal.toString());
これは私が得る出力ですか?
The Double: 0.3
The Big: 0.299999999999999988897769753748434595763683319091796875
何か案は?