title: Java: how to initialize String[]?
body: <p><strong>Error</strong></p>
  
  <pre><code>% javac  StringTest.java 
  StringTest.java:4: variable errorSoon might not have been initialized
          errorSoon[0] = "Error, why?";
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>public class StringTest {
          public static void main(String[] args) {
                  String[] errorSoon;
                  errorSoon[0] = "Error, why?";
          }
  }
  </code></pre>