santhosh.R gowda wrote:
It makes no sense to do this
Ya i know that but i'm asking is there any option to skip finally block
No, you can't skip the finally block. But you can throw an exception in the first line of the finally block to prevent the rest from being executed.
You don't want to do that though. So for real, why do you ask? I am sure there is a better answer to solve your REAL problem, rather than to skip the finally block altogether.
<edit>
There are probably variations on this, like putting a return statement at the top of the finally block. All in all they would be equivalent to deleting the finally block altogether...