If I had: ArrayList m = new ArrayList(); with the double values inside, how should I do to add up all the ArrayList elements?
ArrayList m = new ArrayList();
Not very hard, just use m.get(i) to get the value from the list.
m.get(i)
public double incassoMargherita() { double sum = 0; for(int i = 0; i < m.size(); i++) { sum += m.get(i); } return sum; }