title: Can't compile runnable that calls itself?
body: <p>I'm trying to make a <code>Runnable</code> that calls itself:</p>
  
  <pre><code>class A {
    public void f() {
      final Runnable r = new Runnable() {
        public void run() {
          // do stuff, return if it worked.
          r.run(); // otherwise try again
        }
      };
    }
  }
  </code></pre>
  
  <p>It gets this error:</p>
  
  <pre><code>$ javac A.java
  A.java:6: error: variable r might not have been initialized
          r.run(); // otherwise try again
          ^
  1 error
  </code></pre>
  
  <p>Why? Is there something special in the standard library definition of <code>Runnable</code> which removes the guarantee that the interface implementation is fully defined before it is used (perhaps for example, it has some code that gets run whenever you make an implementation of it)?</p>