I need to have user input the name they would like to have removed then find the index of in the array that, that name is held. Then I need to remove the name along with the price and rating. I may only use parallel arrays. I'm not sure if they other part is running successfully because I am trying to use .remove() and I get the error:
cannot find symbol
symbol: method remove(int)
location: variable array1 of type String[]
code
public static void removeGames(Scanner keyboard, String[] array1,
double[] array2, double[] array3, int currentLength)
{
String removeInput;
System.out.println("Enter the name of the game you would like to remove"
+ " from the list: ");
removeInput = keyboard.next();
for(int i = 0; i < array1.length; i++)
{
if(removeInput.equalsIgnoreCase(array1[i]))
{
array1.remove(i);
array2.remove(i);
array3.remove(i);
}
}
}