I wish to create a java method that returns an array of type: ABCout, where class ABCout is defined as:
public class ABCout {
public int numOut;
public double[] myArray;
}
and the java method is:
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;
}
but I'm getting the error: java.lang.NullPointerException : null
Anyone see what I'm doing wrong?