Exception in thread "main" java.lang.NumberFormatException

2 respostas
F

Boa tarde amigos,

Estou tomando uma Exception in thread “main” java.lang.NumberFormatException na linha 135

134  parte14 =  (restoparte13 + parteA[2] + parteA[4]);

135  restoparte14 = Integer.parseInt(parte14) % Integer.parseInt(mod97);

136  System.out.print("Parte 14: " +  parte14);

137  System.out.println("Resto parte 14: " + restoparte14);

resultado:

parte 13: 102380000Resto parte 13: 89

Exception in thread main java.lang.NumberFormatException: For input string: "[telefone removido]"

at java.lang.NumberFormatException.forInputString(Unknown Source)

at java.lang.Integer.parseInt(Unknown Source)

at java.lang.Integer.parseInt(Unknown Source)

at a.main(a.java:134)
O tipos dos campos são:

static String parte12;

static String parte13;

static String parte14;

static String parte15;

static int restoparte10;

static int restoparte11;

static int restoparte12;

static int restoparte13;

Agradeço pela ajuda.

2 Respostas

staroski

Você está tentando armazenar o valor [telefone removido] em um int.
O valor máximo que um int pode receber é [telefone removido].

F

Valeu Staroski. Me salvou novamente, rss

Muito obrigado!!!

Criado 13 de novembro de 2017
Ultima resposta 22 de nov. de 2017
Respostas 2
Participantes 2