I have an ArrayList with many objets that have values:
miProductoAseo = new ArrayList(); miProductoAseo.add(new ProductoAseo(app, miAseo[0], miAseoPrecio[0], 430, 360, 8000)); miProductoAseo.add(new ProductoAseo(app, miAseo[1], miAseoPrecio[1], 675, 360, 25000)); miProductoAseo.add(new ProductoAseo(app, miAseo[2], miAseoPrecio[2], 920, 360, 5500)); I need to retrieve some of the values im giving to the objects. For example, the last value of each object is a price (8000,25000 and 5500), and I need to make a sum with those values: 8000 + 25000 + 5500 = 38500.
How can I achieve this?