Given below the sample code :
public class section68 {
public static void main(String[] args) {
for (int a= 0;a < 10; ++a) {
try {
if (a % 3 == 0)
throw new Exception("Exception1");
try {
if (a % 3 == 1)
throw new Exception("Exception2");
System.out.println(a);
} catch (Exception inside) {
a*= 2;
} finally {
++a;
}
} catch (Exception outside) {
a += 3;
} finally {
++a;
}
}
}
}
What is the output of the above code :
1. Compile error
2.. 0 1 2 3 .....10
3. 4 7
4. 5 8
(4)