Yep.. Doing the end part in finally would be best idea because if code fails somewhere, program won't reach till .close()
, .disconnect()
statements that we keep before catch statements...
If the code fails somewhere and exception is thrown in between of the program, still finally get executed regardless of exception thrown...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…