posted 23 years ago
Sadeep,
The answer is true. Remember that the finally block always gets executed, no matter what. This will allow the programmers to do cleanup and freeup resources in one place which is guaranteed to execute.
Look at the following code for better understanding.
Also note that the only statement that can cause finally to be skipped is the forced System.exit() call.
Hope this helps,
Ajith
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).