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?
The finally block always executes when the try block exits. So you can use finally without catch but you must use try.
For more details check doc here