+ 3
BigDecimal in java
I an not able to convert String to BigDecimal https://code.sololearn.com/cOhgaNvHAA7g/?ref=app
3 Answers
+ 2
harshit BigDecimal.parseBigDecimal()
I think there is no such method
Try to do it with constructor or using DecimalFormatSymbols and DecimalFormat classes
+ 3
BigDecimal big = new BigDecimal ("1.1");
And don't forget about import
import java.math.BigDecimal;
0
I have made changes to the code and imported the required class but I need to convert String to BigDecimal and that is not working.