Show the output of the following code.
public class Test {
public static void main(String[] args) {
for (int i = 0; i<2; i++) {
System.out.print(i + " ");
try {
System.out.println(1 / 0);
}
catch (Exception ex) {
}
}
}
}
public class Test {
public static void main(String[] args) {
try {
for (int i = 0; i<2; i++) {
System.out.print(i + " ");
System.out.println(1 / 0);
}
}
catch (Exception ex) {
}
}
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.