Exception
Résolu
Bonjour,
je voudrais savoir forcer une exception pour quel ce declanche comment je doit la declarer merci pour laide
public void ajoute(int position)
throws IndexOutOfBoundsException {
if(position < 0 ){
new throws IndexOutOfBoundsException ();// cest ici que je me rappel plus comment faire
}//fin if
}//fin ajoute
j'ai essayé ceci mais ça marche pas
je voudrais savoir forcer une exception pour quel ce declanche comment je doit la declarer merci pour laide
public void ajoute(int position)
throws IndexOutOfBoundsException {
if(position < 0 ){
new throws IndexOutOfBoundsException ();// cest ici que je me rappel plus comment faire
}//fin if
}//fin ajoute
j'ai essayé ceci mais ça marche pas
Configuration: Windows Vista Firefox 3.0.6