I am trying to use the finally block without using the try/catch blocks but getting the error in Eclipse.
Can I use the finally block without using the try/catch blocks?
If an exception is thrown prior to the try block, the finally code will not execute. The finally block always executes when the try block exits. So you can use finally without catch but you must use try.