how do if fix the NullPointerException on an arrylist? : <p>how do if fix the Exception in thread "main" java.lang.NullPointerException
    at BankSystem.Branches.findCustomer(Branches.java:44)
I'm new to coding and java is my first language and I keep getting this error I don't know to fix it.</p>

<pre><code>package BankSystem;

import java.util.ArrayList;

public class Branches {

private String name;
private ArrayList&lt;Customers&gt; newCustomer;

public Branches(){
}

public Branches(String name) {
    this.name = name;
    this.newCustomer = new ArrayList&lt;&gt;();
}

public ArrayList&lt;Customers&gt; getNewCustomer(){
    return newCustomer;
}

public String getName() {
    return name;
}

public boolean addCustomer(String name, double amount) {
    if (findCustomer(name) == null) {
        this.newCustomer.add(new Customers(name, amount));
        return true;
    }
    return false;
}

public boolean addTranstraction(String name, Double amount) {
    Customers existingCustomer = findCustomer(name);
    if (existingCustomer != null) {
        existingCustomer.addTransactions(amount);
        return true;
    }
    return false;
}

private Customers findCustomer(String name) {
    for(int i=0; i&lt;this.newCustomer.size(); i++){
        Customers checkedCustomer = this.newCustomer.get(i);
        if(checkedCustomer.getName().equals(name)) {
            return checkedCustomer;
        }
    }
    return null;
}
</code></pre>

<p>}</p>
