title: Float cannot be dereferenced
body: <pre><code>    class Bank{
      private float transferFrom;
      private float transferTo;
  
      public Bank(float transferFrom, float transferTo){
          this.transferFrom = transferFrom;
          this.transferTo = transferTo;
          BankAccount[] a = new BankAccount[4];
          for(int i = 0; i &lt; a.length; i++){
              a[i] = new BankAccount(i);
          }
      }
  
      public void transfer(float amount){
          if(transferFrom.getBalance() &gt; amount){
              transferFrom.widraw(amount);
              transferTo.deposit(amount);
          }
              throw new RuntimeException("Transfer could not be done.");
      }
  
  }
  </code></pre>
  
  <p>I do not know why I'm getting this error. I'm pretty new at java and everywhere I check the answer is more advanced of what I know. Could you help me? Thank you.</p>