samedi 14 décembre 2019

What does the if statement on this code do?

This code is part of a class called BankAccount.

public void addPayment(Payment newPayment)
    {
        if(numberOfPayments < MAX_PAYMENTS)
        {
            payments[numberOfPayments] = newPayment;
            numberOfPayments++;
        }
        updateBalance();
    }

Aucun commentaire:

Enregistrer un commentaire