Error in an array, java.lang.NullPointerException : <p>So, i'm using an array in my program, and it gives me this error:</p>

<p><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException</code></p>

<p>The error is in fourth line of this code: </p>

<pre><code>int n = numbers.length, numBigger10 = 0; 
for (int i = 0; i &lt; n; i++)
            if (numbers[i] &gt; 10)
                numbersBigger10[i] = numbers[i];               
                numBigger10++;               
</code></pre>

<p>What can I do to solve?</p>

<p>If you want to know more details about the error please feel free to ask.</p>
