title: Java: "Local variable may not have been initialized" not intelligent enough?
body: <p>Consider the following method:</p>
  
  <pre><code>void a ()
  {
      int x;
      boolean b = false;
      if (Math.random() &lt; 0.5)
      {
          x = 0;
          b = true;
      }
      if (b)
          x++;
  }
  </code></pre>
  
  <p>On <code>x++</code> I get the "Local variable may not have been initialized" error.  Clearly x will never be used uninitialized.  Is there any way to suppress the warning except by initializing x?  Thanks.</p>