title: Array variable "might not have been initialized"
body: <p>I get the error:</p>
  
  <blockquote>
    <p>TestCounter.java:115: variable
    counters might not have been
    initialized
           counters[i] = new Counter(i);</p>
  </blockquote>
  
  <p>And I can't figure out how to fix it. I know that my class, <code>Counter</code>, works. Below is my code, if you could have a look at it I would be very happy. This code is wrapped in the main method of a <code>TestCounter</code> class.</p>
  
  <pre><code>  if(success) 
    {  
     Counter[] counters;
  
     for(int i=0; i&lt;30; i++)
     {
         counters[i] = new Counter(i);
         System.out.println(counters[i].whatIsCounter());
     }
    }
  </code></pre>