//use startsWith method to search using a partial string import java.util.Scanner; public class eg23_PersonSearch { public static void main(String[] args) { String lookUp; String[] people = {"Cutshaw, Will","Davis, George","Davis, Jenny","Russel, Phil","Russel, Cindy"}; //Create a Scanner object for keyboard input Scanner keyboard = new Scanner(System.in); System.out.print("Enter the first few characters of the last name to look up: "); lookUp = keyboard.nextLine(); System.out.println("Here are the names that match: "); for (String person : people) { if (person.startsWith(lookUp)) System.out.println(person); } } }