The program tells me that I don't have a method called durchNullTeilen and that I dont use the method in the main method even though I do have and use it.
package de.codegym.task.task09.task0919;
/*
Division durch Null
Erstelle die Methode public static void durchNullTeilen, die eine beliebige Zahl durch 0 teilt, und zeige das Ergebnis der Division an.
Schließe die Methode durchNullTeilen in einen try-catch-Block ein. Zeige den Stacktrace der Ausnahme mithilfe der Methode exception.printStackTrace() an.
*/
public class Solution {
public static void durchNullTeilen(int x){
System.out.println(x/0);
}
public static void main(String[] args) {
try {
durchNullTeilen(8);
} catch (ArithmeticException e){
e.printStackTrace();
} catch (Exception e){
e.printStackTrace();
}
}
}