title: Assign final variable in a try block
body: <p>Very short question: Is there a more elegant way to do this:</p>
  
  <pre><code>Object tmp;
  try {
   tmp = somethingThatCanFail();
  } catch (Fail f) {
   tmp = null;
  }
  final Object myObject = tmp;
  // now I have a final myObject, which can be used in anonymous classes
  </code></pre>