si l'instruction pour lancer Exception?

Salut, je voulais vous demander, parce que je ne suis pas sûr si c'est propriete à l'aide d'Exception:

public int Method(int a, int b) {
   if(a<b) throw new ArgumentException("the first argument cannot be less than the second");
   //do stuff... 
}

puis-je jeter l'Exception après, si l'énoncé? ou dois-je toujours utiliser try - catch quand il s'en va avec les exceptions?

InformationsquelleAutor TrN | 2011-05-31