What is wrong with the following code?
class X extends Exception {}
public class Y
{
public void foo()
{
try {
b();
}
finally {
ba();
}
catch (MyException e) {}
}
public void b() throws X {
throw new X();
}
public void ba() throws RuntimeException {
throw new RuntimeException();
}
}
Correct Answer: Finally block should come after the catch block
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Java MCQ Questions