Why does the code below throw a java number format exception?
BigDecimal d = new BigDecimal("10934,375");
The problem is that constructor of BigDecimal
requires decimal number format where decimals come right after decimal dot .
instead of decimal comma ,
so the right format for this specific case would be:
BigDecimal d = new BigDecimal("10934.375");