What is the best way to calculate values in java? I need to make a method that returns the sum of all input and output and subtraction. Example: Insert all entries in Double in column X, and all double output in column Y (get the total of each column), to get the balance of the day, which is Input subtracted by Output and find subtTotal, which is the current balance more the balance of the day. If you have an example you will be welcome.
I thought and use a for loop, but I do not know how! Can someone help me please!