I am trying to get the persons position in the array by typing the persons name in the console.
public static void main(String[] args) {
Students[] student = new Students[50];
student[0] = new Students("Helen", "Jones", 10);
student[1] = new Students("Fred ", "Smith", 15);
student[2] = new Students("George", "Evans", 25);
student[3] = new Students("Malcolm", "Evans", 30);
Scanner userInput = new Scanner(System.in);
System.out.println("Enter Forename");
String name = userInput.nextLine();
Arrays.asList(student).indexOf(name);
I expect to be able to input a name into the console and then it'll show the persons position in the array. Please, any form of help is appreciated. Thank you