title: Java 2 Dimentional Color Array. Is it possible?
body: <p>Is a 2Dimentional Color array possible such as</p>
  
  <pre><code>public static Color[] worlds;
  public static ArrayList&lt;String&gt; world = new ArrayList&lt;String&gt;();
  
  public void tick() {
      for (int i = 0; i &lt; world.size(); i++) { //lets say world has 6 values in it
          worlds[i] = new Color(0, 0, 0, 100);
      }
  }
  </code></pre>
  
  <p>The only problem is when I try to change the color of i in the worlds, it returns a NullPointerException. Any Ideas? If necessary I can provide full class file, and explain in detail what it is supposed to do.</p>