Java - Exception Handling
Consider this method:
public static int test() {
try {
System.out.print("Try-");
throw new RuntimeException();
} catch(RuntimeException e) {
System.out.print("Catch-");
return 1;
} finally {
System.out.print("Finally-");
return 2;
}
}What will System.out.print(test()); output?
