how can i call addInterest() method from interface class to update currentbalance which is stored in the Bankaccount arraylist
public abstract class BankAccount{

//Some code here
}

public abstract  class SavingsAccount extends BankAccount
{

    //some code here
    public abstract addInterest();

}

public class PassBookAccount extends SavingsAccount
{

    private currentBalance;
    
    public PassBookAccount()
    {
        //some code
    }
    public void addInterest()
    {
       this.currentBalance += this.currentBalance * this.passInterest; 
    }

}

public class interface
{

     private static ArrayList<BankAccount> bnk = new ArrayList<BankAccount>();
     private static  PassBookAccount p;
     private static  InvestmentAccount invs;
     private static  ChequeAccount ch;

    public static void main(String[] args)
    {
       //some code here
    }

     public static void passBookAccount () 
     {
            String fname = JOptionPane.showInputDialog("Enter the first name:");
            String sname = JOptionPane.showInputDialog("Enter the surname:");
            String ad = JOptionPane.showInputDialog("Enter the Address:");
            String phn = JOptionPane.showInputDialog("Enter the phn number:");
            double b = Double.parseDouble(JOptionPane.showInputDialog("Enter the Opening Balance"));
            
            bnk.add(new PassBookAccount(fname,sname,ad,phn,b));
     }

    public static void addInterest() 
    {
            for(int i = 0; i < bnk.size(); i++)
            {
                BankAccount b = bnk.get(i);
                if(b instanceof PassBookAccount)
                {
                    //how can i call addInterest method in PassBookAccount class from here?? somebody please help me!!
                   
                }
                
            }
        }
}
how can i call addInterest() method from interface class to update currentbalance which is stored in the Bankaccount arraylist
===

public abstract class BankAccount{

//Some code here
}

public abstract  class SavingsAccount extends BankAccount
{

    //some code here
    public abstract addInterest();

}

public class PassBookAccount extends SavingsAccount
{

    private currentBalance;
    
    public PassBookAccount()
    {
        //some code
    }
    public void addInterest()
    {
       this.currentBalance += this.currentBalance * this.passInterest; 
    }

}

public class interface
{

     private static ArrayList<BankAccount> bnk = new ArrayList<BankAccount>();
     private static  PassBookAccount p;
     private static  InvestmentAccount invs;
     private static  ChequeAccount ch;

    public static void main(String[] args)
    {
       //some code here
    }

     public static void passBookAccount () 
     {
            String fname = JOptionPane.showInputDialog("Enter the first name:");
            String sname = JOptionPane.showInputDialog("Enter the surname:");
            String ad = JOptionPane.showInputDialog("Enter the Address:");
            String phn = JOptionPane.showInputDialog("Enter the phn number:");
            double b = Double.parseDouble(JOptionPane.showInputDialog("Enter the Opening Balance"));
            
            bnk.add(new PassBookAccount(fname,sname,ad,phn,b));
     }

    public static void addInterest() 
    {
            for(int i = 0; i < bnk.size(); i++)
            {
                BankAccount b = bnk.get(i);
                if(b instanceof PassBookAccount)
                {
                    //how can i call addInterest method in PassBookAccount class from here?? somebody please help me!!
                   
                }
                
            }
        }
}