Arithmetic exception
public class ExceptionExample {
public static void main(String[] args) {
try {
int a = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Arithmetic Exception occurred: " + e.getMessage());
}
}
}
public class ExceptionExample {
public static void main(String[] args) {
try {
int a = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Arithmetic Exception occurred: " + e.getMessage());
}
}
}
Comments
Post a Comment