NumberFormatException

后端 未结 2 1210
面向向阳花
面向向阳花 2021-01-26 01:13

I\'m trying to develop an app that will take a number from the dial pad and call another number instead. But i get a number format exception on the phonenumber i want to call. <

2条回答
  •  面向向阳花
    2021-01-26 01:49

    2156689451 is too big for an int (which range from -2^31≈-2,147E9 to +2^31-1≈2,147E9, whereas your number is ~2,15E10)

    Use long instead of int...

提交回复
热议问题