public class ExceptionDemo2 {
public static int meth() {
try {
throw new RuntimeException("ExceptionGenerated");
}catch(Exception e) {
System.out.println("HELO hoo");
return 1;
}
finally {
System.out.println("HELO boo");
return 2;
}
}
public static void main(
String[] args) {
int j=meth();
System.out.println(j);
}
}
Here i am not able to understand why return statement in catch block not getting executed.
Any help???