public class ExceptionTest{
public static void main(
String args[]) throws Exception{
try
{
m2();
}
finally { m3();}
}
public static void m2() throws NewException
{
throw new NewException();
}
public static void m3() throws AnotherException
{
throw new AnotherException();
}
}
The answer says it will compile fine and throw AnotherException when
run. But will it not throw both the excptions?