public class ExceptionHandling {
public static void main(String[] args) {
double dbl = 1.0;
try {
dbl = dbl / 0;
System.out.println("unreachable");
} catch (ArithmeticException e) {
System.out.println("catch");
} finally {
System.out.println("finally");
}
}
}
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать