java.lang.NumberFormatException: For input string

前端 未结 7 624
栀梦
栀梦 2020-11-28 16:15

the eclipse tells that lang and i cant find a solution

Exception in thread \"main\" java.lang.NumberFormatException: For input string: \"2463025552\"

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 16:33

    The real problem is that a phone number is not an integer. It is a String. You should not store it as a number, for reasons similar to the problem you are encountering now. The same applies for ZIP codes, sports team's jersey numbers, and a host of other "fake" numbers.

提交回复
热议问题