Question: here is a sample:

```
class A{

    method1(){
     int result = //do something
     if(result > 1){
      method2();
     } else{
       // do something more
     }
    }

    method2(){
     try{
       // do something
     } catch(Exception e){
       //throw a message
      }

     }
    }

```

when situation is something like this.

When the catch block inside Method2 is called, I want the program to continue execution and move back to the else block inside Method 1. How can I achieve this?

Thanks for any help.

Answer: 
Simply encapsulate the call of `method2` in a `try-catch` block. Catching the exception will not allow the unhandled exception to be thrown. Do something like this:

```
if(result > 1){
    try {
         method2();
     } catch(Exception e) { //better add specific exception thrwon from method2
         // handling the exception gracefully
     }
   } else{
       // do something more
}

```
You need a double `if` instead.

```
method1()
{
    if(result > 1)
    {
        if(method2()) { execute code }
        else { what you wanted to do in the other code }
    }
}

```

and ofc let method 2 return something (in this case I let it return bool for easy check)