I'm attempting to write a method in a class that will prompt the user to enter the name of a student. Then search the list of already existing names for a match. But I cant seem to figure out how to proceed in coding it on how to search for a valid match.
public void modifyExam(String [] names)
{
String name;
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter the name of the student whose grade you would like to modify: ");
name = scanner.nextLine();
boolean nameMatch = true;
for (int i=0; i<names.length; i++)
{
// ....
}