Important Java tip:

In a try-catch-finally block, finally is always called.

Do not assume that you are in finally because your try threw an exception. Cleaning up resources that you built in try during finally will really make your program fail.