📅  最后修改于: 2022-03-11 14:48:28.746000             🧑  作者: Mango
public Customer findUsingEnhancedForLoop(
String name, List customers) {
for (Customer customer : customers) {
if (customer.getName().equals(name)) {
return customer;
}
}
return null;
}