java: newbie on indexing object arrays
<p>I wish to create a java method that returns an array of type: ABCout, where class ABCout is defined as:</p>

<pre><code>public class ABCout {
    public int numOut;
    public double[] myArray;
}
</code></pre>

<p>and the java method is:</p>

<pre><code>public ABCout[] GetABC( double myInput ) throws Exception {
   ABCout[] userABC = new ABCout[3];

   userABC[0].numOut = 10;
   userABC[0].myArray = new double[1];
   userABC[0].myArray[0] = myInput;
   /* here I only fill the 0'th element, but once working I will fill the others */

   return userABC;
}
</code></pre>

<p>but I'm getting the error: <code>java.lang.NullPointerException : null</code></p>

<p>Anyone see what I'm doing wrong?</p>
