Hello,
I'm having trouble with the ArrayList add method it seems to be giving me an error in BlueJ. It say's no sutiable method found for add(int) method java.util.ArrayList.add(int,Order)... And how would I create a new object inside a method which will add the parameters to the arraylist.
Thanks
Here's my code:
public class OrderBook
{
ArrayList<Order> Orders;
public OrderBook()
{
Orders = new ArrayList<Order>();
}
public void addNewOrder(String name, int quantity)
{
new OrderBook();
Orders.add(name);
Orders.add();
}