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);
}
So technically a boolean is True (1) or False(0)
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()
CreatePaymentRecords(TermDates, FYEProcessing);
if (FYEProcessing) {
//run again
CreatePaymentRecords(TermDates, FYEProcessing);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With