public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
String[]repName = new String[5];
double[]salesAmount = new double[5];
System.out.println("Please Enter Sales Reps Name Followed By Monthly Sales: \n");
for (int i = 0 ; i < repName.length; i++ )
{
System.out.print("Sales Rep (Full Name): " );
repName[i] = input.nextLine();
System.out.print("Monthly Sales: € " );
salesAmount[i] = input.nextDouble();
System.out.println();
}
The code will only allow me to input a full name once, ie John Doe. It will not let me enter it with other doubles in the array. Why is this?