airavata-courses / TeamIndra

Team One's Repository for Spring 2016 I590 Class
1 stars 0 forks source link

Suggested improvements - Using finally block #8

Closed amrutakamat16 closed 8 years ago

amrutakamat16 commented 8 years ago

It is a good practice to use finally block especially when you are dealing with system resources, such files or connections. All connections can be closed in the finally block. If an exception was thrown then it can happen that you may miss to execute some clean up code and leave resources allocated, or objects in an inconsistent state.

bhandaresagar commented 8 years ago

thanks for suggestion, we will make sure to put finally block where resources are accessed in the application.