Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
class TryFinally {
  private static boolean doLogic() {
    try {
      throw new IllegalStateException();
    } finally {
      System.out.println("logic done");
    }
    // Any return statements must go here; 
    // applicable only when exception is thrown conditionally
  }
}

Exceptions

ERRO4-EX0: Control flow statements whose destination is within the finally block are perfectly acceptable.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cdd6cce1627ac78f-d7027837-4c484ca1-acdaa707-fee8bb9164ad8d5a23ae94d3"><ac:plain-text-body><![CDATA[

[[Bloch 2005

AA. References#Bloch 05]]

Puzzle 36. Indecision

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b5beddd4b5e77350-727d8924-4e864245-932e939c-d28325378f097c43a0be90b4"><ac:plain-text-body><![CDATA[

[[Chess 2007

AA. References#Chess 07]]

8.2, Managing Exceptions, The Vanishing Exception

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c2472038e4dc7a4f-1cce1465-4da1453f-ada791f0-fe61e504bf3bca3f4a1ec355"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. References#JLS 05]]

[§14.20.2, Execution of try-catch-finally

http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.20.2]

]]></ac:plain-text-body></ac:structured-macro>

...