choose from array list elements that match user input
<p>I'm new to java and I'm trying to create a customer database program. There are some <code>Customers</code> with different <code>firstName</code> but same <code>lastName</code> (and visa-versa). If user inputs <code>Customer</code> <code>lastName</code> to search for and <code>lastName</code> matches multiple <code>Customer</code>s, how can I show a list of <code>Customer</code>s who matched the user's input and then be prompted to select which <code>Customer</code> is to be used?</p>

<p>Here is the code I have so far:</p>

<pre><code>private Customer searchCustomer(String search) {
Customer customer = null;
for (Customer cust : mockCustomerDatabase) {
    if (cust.getLastName().toLowerCase().indexOf(search.toLowerCase()) &gt; -1) 
    return cust;
    }
}
return customer;
}
</code></pre>

<p>Customer database:</p>

<pre><code>private void createMockData() {
Customer cust = new Customer("Brain", "Holtz", "Brian@Holtz.Com");
mockCustomerDatabase.add(cust);
cust = new Customer("Bruce", "Bagley", "Bruce@Bagley.com");
mockCustomerDatabase.add(cust);
cust = new Customer("Courtney", "Lee", "Courtney@lee.com");
mockCustomerDatabase.add(cust);
cust = new Customer("Jacob", "Graf", "Jacob@graf.com");
mockCustomerDatabase.add(cust);
cust = new Customer("Jacob", "Brown", "Jacob@Brown.com");
mockCustomerDatabase.add(cust);
cust = new Customer("Kevin", "Brown", "Kevin@Brown.com");
mockCustomerDatabase.add(cust);
</code></pre>

<p>Customer Class:</p>

<pre><code>public class Customer {
public String firstName;
public String lastName;
public String email;
public Customer(String firstName, String lastName, String email) {
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
}

public Customer() {
}

//Getter's and Setter's 
@Override
public String toString() {
return "Customer [firstName=" + firstName + ", lastName=" + lastName       + ",email=" + email + "]";
}

}
</code></pre>