I have a method that is of type
public Float get Discount()
I want to keep a counter that gets all the discount value and if the value is greater than 100 it will flag an aerror.
Float counter = new Float(0)
for(int i=0;i< Arr.length;i++)
counter = counter + Arr[i].getDiscount()
where Arr[i].getDiscount return type is float.
What is the best way to do this.