I have a double variable declared inside a for loop, this variable returns different values according to the loop through the list array.
for(int i = 0; i < ticketAdapter.mTicket.mLines.size(); i++){
double totalNoVATt = ticketAdapter.mTicket.mLines.get(i).mTotalNoVAT * ticketAdapter.mTicket.mLines.get(i).mUnits;
Log.i("MainActivity","totalnovat "+ totalNoVATt);
}
I wanted to know how to save the sum of these values in a variable that it returns to me.
Greetings.