If you have a try-catch-finally setup, the finally block will always execute if an exception occurs. If you're looking for a way around this, you can do a System exit in the try block itself if you never want to trigger the finally block. This is the statement you would use in the try block:
System.exit(0);
To know more intricacies regarding Java programming, you can opt for java certification training which would teach you the concepts of exception handling in a much more structured way.