I am trying to write a java program that prompts the user to enter 5 names. These names need to be stored in an array. Once the 5th name is entered, the program will automatically print the results back to the user. I am having problems getting my scanner working to capture the user's input when they type the name.
This is what I have so far:
Scanner input = new Scanner(System.in);
System.out.println("Enter name 1: ");
String name 1 = input.nextLine();