I am trying to write a method in a `BankAccount` class that withdraws money from an account, with only two parameters, being "user" field of type `User` (which is a class that contains a `String username`, and a `String password`, and an `ArrayList<String> usernames`), and "amount" field of type double. 

The `BankAccount` class has a `accountOwner` field of type User and an `availableFunds` field of type `double`. I am trying to figure out how to find/access an instance of a `BankAccount` class, via the user parameter which is of type `User`.

I am new to Java, and I don't understand how to call an instance of "BankAccount" only by a User type variable.

I've tried creating a new `BankAccount` instance, but I don't want to do this, because I am trying to access an already existing instance of `BankAccount`. 

Here are the relevant methods and fields of the User class:

```
public class User {
    static ArrayList<String> usernames = new ArrayList<String>();

    private String username;
    private String password;

    public String getUsername()
    {
        return username;
    }

```

BankAccount class:

```
public class BankAccount {

    private User accountOwner;
    private double availableFunds;

public double getFunds()
    {
        return availableFunds;
    }

public void deposit(double deposit)
    {
        availableFunds += deposit;
    }

```

This is the method that I have to try and write:

```
public void withdraw(User user, double withdrawal) throws UserException, FundsException
    {

    }

```

Basically, the user enters a User user and double withdrawal amount, I have to deduct the withdrawal amount from a BankAccount class that is referenced using the User user somehow.