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?
No you can't
you can use Try-catch-finally or try-finally
Try-catch-finally
try-finally
try { }catch (Exception e){ } finally{ }
or
try { } finally{ }