KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it considered bad programming to write a try and catch within a finally clause? I'm having in my main method a fileInputStream which I want to close. I want to place the .close() in the finally, so it will close no matter what. I don't want to add a throws declaration to the main method, as it is the main method :P }finally{ try { commandFile.close(); } catch (IOException e) { throwException(e); } } is it ok? Thanks
Tags (comma-separated)
Save Edits
Cancel