Bonjour à tous,
j'ai fouillé un peu partout j'ai pas pu resoudre un problème qui me prend la tete que voici:
c'est une erreur qui surgit lors de l'execution de mon programme voici ce qui apparait:
à la ligne 33 voici le code correspondand:Code:
1
2
3
4
5
6 Exception in thread "main" java.lang.NumberFormatException: For input string: "s" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65 at java.lang.Integer.parseInt(Integer.java:492) at M.tobinacol(M.java:33) at M.traitement(M.java:67) at M.main(M.java:97)
à la ligne 67 voici le code correspondant:Code:int a= Integer.parseInt(s, 2);
A la ligne 97 voici:Code:mat[nbRow-1][j]= tobinacol(str);
Mais à mon humble avis tout part de la ligne 33 et voici le code qui la contient :Code:listMat.add(traitement(mot));
MerciCode:
1
2
3
4
5
6
7
8
9
10 ............. { int a= Integer.parseInt(s, 2); int n= Integer.bitCount(a); if (n % 2 == 0) return '0'; else return '1'; }