In my program the user is supposed to be able to make a deposit. There are no errors or anything but the problem is the balance stays the same. The method works outside the if statement however.
if (selection == 'A')
{
System.out.println("There is currently $"+currentBalance+" in this account.");
System.out.println("How much do you want to add?");
name.addToBalance(input.nextInt());
System.out.println("There is now $"+currentBalance+" in this account");
}
Aucun commentaire:
Enregistrer un commentaire