title: invoking interface method in abstract class method
body: <p>The code is running but I would like to understand the topic better and I am not sure how to name the problem. How is it possible that in abstract class method I can invoke an interface method if the interface method is empty? Could anyone please tell me how this kind of operation is called in Java? In my uni classes I attend, the slide names the problem as  "Programming through API" but I cannot find anything when I google it.</p>
  
  <p>I have an interface class which has getBalance method:</p>
  
  <pre><code>public interface BankAccount {
  
  int getBalance();
  ...
  }
  </code></pre>
  
  <p>Then I am invoking the interface method in an abstract Class method:</p>
  
  <pre><code>public abstract class AbstractBankAccount implements BankAccount {
  
  private final bankAccountNo;
  private int accountBalance;  
  
  abstractBankAccount(int bankAccountNo) {
      this.bankAccountNo = bankAccountNo;
  }
  
  public void transferBalance(bankAccount account) {
  
  // so here is what I am struggling to understand: account.getBalance() is called, but getBalance() method in interface is empty, how does it work then? 
  
  final int accountBal = account.getBalance();
  
      if (accountBal &lt; 0)
          throw new IllegalArgumentException("not enough money on the account");
  
      accountBalance += accountBal;
  
      account.withdraw(accountBal);
  }
  }
  </code></pre>