java.lang.NumberFormatException: For input string: “20,475.00”

后端 未结 4 902
北荒
北荒 2021-01-13 19:58

i am trying to get the running balance of my system. To do it, i get the sum of all numbers in the jtable from column AMOUNT and subtract the sum to the value inside the txt

4条回答
  •  日久生厌
    2021-01-13 20:55

    I tried this two line to convert string into double

    NumberFormat nf = NumberFormat.getInstance()
    dounum=nf.parse("24,000.50").toDouble()
    

提交回复
热议问题