public class HelloWorld {
static {
try {
int i=10/0;
} catch(ExceptionInInitializerError | ArithmeticException e) {
e.printStackTrace();
}
}
public static v
Warum löst der folgende Code die unten gezeigte Ausnahme aus? BigDecimal a = new BigDecimal("1.6");
BigDecimal b = new BigDecimal("9.2");
a.divide(b) // results in the following exception.
- java.
Ich bin nicht in der Lage, dieses Programm zu verstehen. Ich erwarte, dass es "Hallo Welt" ausgibt, aber stattdessen druckt es nur die "Welt". Ich dachte, dass zuerst der try Block ausgeführt würde, "