Every time I loop my `interestRate` variable is not resetting. I want it to update my interest when looping, at first I have the correct value of 1650 but when it comes to the third input all the interest from first, second, and third will just sum up. I'm expecting 1760.0 as the output but it shows 1925.0.

```
import java.util.*;
class SavingsAccount {

    private double balance;
    public static double interestRate = 0;
    static double updatedrate;
    public static void setInterestRate(double newRate){
        interestRate = newRate;
    }
    public static double getInterestRate(){
        return interestRate;
    }
    public double getBalance(){
        return balance;
    }
    public void deposit(double amount){
        balance=balance + amount;
    }
    public double withdraw(double amount){
        if(balance>=amount){
        balance= balance-amount;
        }
        else{
            amount=0;
        }return amount;
    }
    public void addInterest(){
        double interest = balance * getInterestRate(); 
        balance = balance + interest;
    }
    public static void showBalance(SavingsAccount account){
        System.out.println("Your new Balance is "+ account.getBalance());       
    }
public class RunSavingsAccount {
    public static void main(String[] args) {
        SavingsAccount savings = new SavingsAccount();
        Scanner sc = new Scanner(System.in);
        try{
        System.out.print("Enter Interest Rate: " );
        double rate1 = sc.nextDouble();
        savings.setInterestRate(rate1);
        System.out.print("Enter Deposit Amount: " );
        double balance1 = sc.nextDouble();
        savings.deposit(balance1);
        System.out.println("Your balance is: "+ balance1);
        boolean bol = false;
        while(!bol){
            System.out.print("Press D for another deposit or W to withdraw or E to exit: ");
            String transaction = sc.next();
            if (transaction.equals("d")) {
                System.out.print("Enter Deposit Amount: " );
                double balance2 = sc.nextDouble();
                savings.deposit(balance2);
                savings.addInterest();
                savings.showBalance(savings);  
            }   
            else if(transaction.equals("w")){
                System.out.print("Enter Withdraw Amount: " );
                double with = sc.nextDouble();
                savings.withdraw(with);
                System.out.println("");
                System.out.println("Your have succesfully withdraw: "+ with);
                savings.showBalance(savings);
            }
            else if(transaction.equals("e")){
                System.out.println("Thank You Please Come Again.");
                bol = !bol;
            }
            else{
                System.out.println("Invalid Input");
            }
        }
    }
    catch(Exception e){
        System.out.print("Invalid Input");
    }
}
}

```

Output:

```
Enter Interest Rate: .10
Enter Deposit Amount: 500
Your balance is: 500.0
Press D for another deposit or W to withdraw or E to exit: d
Enter Deposit Amount: 1000
Your new Balance is 1650.0
Press D for another deposit or W to withdraw or E to exit: d
Enter Deposit Amount: 100
Your new Balance is 1925.0
Press D for another deposit or W to withdraw or E to exit:

```