Normal
ok, mal Schritt für Schritthier ist die Methode, die müsste so ja stimmensie wirft jetzt eine Exception und ich fange sie nicht gleich auf..[code=Java]public class Slipsize_too_small_Exception{ public void text(int a) throws IllegalArgumentException{ if (a < 120) { throw new IllegalArgumentException(); } else { System.out.println("well done"); } }}[/code]
ok, mal Schritt für Schritt
hier ist die Methode, die müsste so ja stimmen
sie wirft jetzt eine Exception und ich fange sie nicht gleich auf..
[code=Java]
public class Slipsize_too_small_Exception{
public void text(int a) throws IllegalArgumentException{
if (a < 120) {
throw new IllegalArgumentException();
} else {
System.out.println("well done");
}
}[/code]