So technically a boolean is True (1) or False(0)…how can I use a boolean in a loop?
so if FYEProcessing is False, run this loop one time, if FYEProcessing is true, run it twice:
for (Integer i=0; i<FYEProcessing; ++i){
CreatePaymentRecords(TermDates, FYEProcessing);
}
This is not true in Java. You cannot use an integer in place of a boolean expression in a conditional, i.e.
if (1) {...}is not legal.You are better of just doing this sequentially rather than attempting to use some sort of looping strategy to avoid having two lines which call
CreatePaymentRecords()