Question: package test; class Main { public static void main(String[] args) { int x = 1 / 2; try { System.out.println(x / x); } catch (ArithmeticException
package test;
class Main {
public static void main(String[] args) {
int x = 1 / 2;
try {
System.out.println(x / x);
} catch (ArithmeticException e) {
System.out.println(e.getMessage());
}
}
}
What is the output in java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
