You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getBigDecimal converts the double to a String and than to a BigDecimal: new BigDecimal(Double.valueOf(72.35).toString())
optBigDecimal converts the double directly to BigDecimal: new BigDecimal(Double.valueOf(72.35))
The text was updated successfully, but these errors were encountered:
There is a difference between getBigDecimal and optBigDecimal.
prints:
Why is there a difference?
getBigDecimal converts the double to a String and than to a BigDecimal:
new BigDecimal(Double.valueOf(72.35).toString())
optBigDecimal converts the double directly to BigDecimal:
new BigDecimal(Double.valueOf(72.35))
The text was updated successfully, but these errors were encountered: