public class test { public static void updateUserTitle() { System.out.printf("\n"); System.out.println("Please enter a valid user ID: "); String titleInput = console.nextLine(); User foundUser = null; for (int i=0; i <= currentUsers; i++) { if (titleInput == userArray[i].userID) { foundUser = userArray[i]; } } if(foundUser!=null) { System.out.println("Please enter the new name for the user: "); String newName = console.nextLine(); empArray[i].username = newName; } else { System.out.println("User not found"); } }