title: how to read two parameters of the same type?
body: <p>I'm trying to create a method to transfer funds from one account to another..</p>
  
  <p>I'm trying to take both sending and receiving account numbers  of account class as input parameters but I'm getting invalid account number exception. </p>
  
  <p>How to do this without generating exceptions?
  IS there any way to make both parameters as 'accountNumber'?</p>
  
  <pre><code>public int fundTransfer(int accountNumber, int accountNumber1, int amount) throws InvalidAccountNumberException, InsufficientBalanceException{
  
      Account account=searchaccount(accountNumber);
      Account account1= searchaccount(accountNumber1);
  
      if(amount&gt;0){
          account.setAmount(account.getAmount()-amount);
          account1.setAmount(account1.getAmount()+amount);
      }else{
          throw new InsufficientBalanceException();
      }
  
      throw new InvalidAccountNumberException();
  }
  </code></pre>