I have data in this format, its a arraylist of object itemdata.
static class itemData{
private String itemName;
private int quantity;
private double price;
private int couponCode;
private int couponId;
}
public List<itemData> itemList = new ArrayList<>();
below fuction is how i am storing the data
public couponInterface addItems(String itemName, int quantity, double price,
int couponCode, int couponId) {
itemData t = new itemData();
t.itemName = itemName;
t.quantity = quantity;
t.price = price;
t.couponCode = couponCode;
t.couponId = couponId;
itemList.add(t);
return this;
}
how do i retrieve the data and print it?
the current output shows - couponAbstract$itemData@31f924f5