I have a noobish question. If you have a nested try-catch block and an exception is thrown in the inner catch block, will the outer catch block catch it? Example:
try { // All this code is random. It doesn't
int x = 5; // have anything to do with my actual program;
Scanner sin = new Scanner(new File("file.txt"));
String temp = "Howdy Y'all";
try {
x = Integer.parseInt("5f"); // EXCEPTION!
} catch { // Caught it.
x = Integer.parseInt(temp); // NEW EXCEPTION!
}
} catch {
// Did the NEW EXCEPTION get caught here?
}
I'm almost positive the answer is yes, but want to be sure before I finish the code.