Erreur exception java.lang.NullPointerException
Bonsoir,
J'ai une exception que je comprend bien mais je ne vois pas le problème dans mon programme.
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
static public List<String> retur;
public List<String> Enrol(String ....) {
try {
...
id = ...
comp = ...
...
}
retur.add(id);
retur.add(comp);
System.out.println(retur);
} catch (IOException ex) {
ex.printStackTrace();
}
return retur;
}
} |
Merci pour votre aide
Apparement l'erreur se situe vers retur.add(id) mais je ne vois vraiment pas pourquoi. "id" contient bien ce que je veux
merci