Even after I set a for loop in my constructor I receive a null pointer exception any ideas why?
here is a bit of the code
private String[] ingredientName,units = new String [40];
private double[] ingredientAmount = new double [40];
public Recipe() // Recipe Constructor example
{
for(int setVals =0; setVals<40;setVals++)
{
ingredientName[setVals] = new String("");
units[setVals] = new String("");
ingredientAmount[setVals] = new Double(0.0);
}
}