Question à propos un programme d'exceptions
Bonjour,
J'ai cette méthode main:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
public static void main(String[] args) {
try {
Ville v = new Ville("Ts", 1200, "France");
} catch (NombreHabitantException ex) {
ex.printStackTrace();
} catch (NomVilleException ex) {
System.out.println("Erreur de nom");
}
finally{
System.out.println("Je suis dans le bloc finally");
}
} |
Le problème c'est que sous la ligne ex.printStackTrace(); l'IDE m'affiche un warning indiquant que Throwable.printStackTrace() should be removed, je me demande pourquoi?
C'est quoi le problème, merci! :ccool: