What is a finally block?

July 28th, 2009 by uCertify Leave a reply »

A finally block is used to execute a certain portion of code that must be executed, irrespective of whether or not an exception is caught. Even if a catch block is not found, a try block can still be used with a finally block. It allows a programmer to avoid having cleanup code accidentally bypassed by a return, continue, or break statement. A finally block does not execute only when a System.exit() statement is encountered or the program terminates due to an error.

  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.