I've created an empty arraylist here:
private ArrayList<OrderItem> conveyorBelt = new ArrayList<OrderItem>(10);
And in the same class, I've created a method where I add item into the conveyorBelt by inputting the orderNum (which is an int). This is what the method looks like:
public void addToConveyorBelt( int orderNum )
{
OrderItem oi;
conveyorBelt.add(oi.getOrderNum(orderNum)); // line 4
}
This doesn't work. I get a compile error on line 4, saying this: http://i52.tinypic.com/ny8n86.jpg
Anyone know where i'm going wrong with this?
p.s. - the OrderItem contains one variable called theOrderNum and a method that calls it called getOrderNum.