I have a methode that use an effectively final variable total intialised with 0, i'm suposed to have the sum of products price but i'm always getting 0, can someone tell me what i'm missing
public BigDecimal getTotalAmount() {
BigDecimal total = BigDecimal.ZERO;
products.forEach(product -> total.add(product.getPrice()));
return total;
}