Question: If execution doesn't cause exception then control goes to finally block. **So is the return statement in try block is being ignored by JVM?** . Or if exception occurs then control goes to catch block there also it ignored return statment and control go to finally block and return from finally

```
  public class Helper {
     public int showException(int a, int b){

           try{
           int c=a/b;
           return c;
           } catch(Exception e){
                return 0;
           } finally{
               return 3;
             }
     }
  }

```

Answer: 
Because `finally` block will be executed every time whether you enter in `try` or in `catch`, I think that's why its called **finally** :)

[FROM **JAVA DOCS**](http://docs.oracle.com/javase/tutorial/essential/exceptions/finally.html)

> 
> The finally block always executes when the try block exits. This
>  ensures that the finally block is executed even if an unexpected
>  exception occurs.
> 
> 
> 

Note: It won't be executed only when
------------------------------------

> 
> If the JVM exits while the try or catch code is being executed, then
>  the finally block may not execute. Likewise, if the thread executing
>  the try or catch code is interrupted or killed, the finally block may
>  not execute even though the application as a whole continues.
> 
> 
>
Finally will get called last no matter if the catch block is called or not. Perhaps you want to read more documentation. [MSDN Try Catch Finally](http://msdn.microsoft.com/en-us/library/ie/4yahc5d8%28v=vs.94%29.aspx)