`System.out.println();
ArrayList<String> runescape = new ArrayList<String>();
while (true) {
display();
int optionNum = input.nextInt();
if (optionNum == 1) {
System.out.print("Enter a String : ");
runescape.add(input.next());
System.out.println("Element Added");
}
else if (optionNum == 2) {
System.out.print("Enter String to remove :");
String remov = input.next();
if (runescape.contains(remov)) {
runescape.remove(new String(remov));
System.out.print("The String been removed.");
}else
System.out.println("That String does not exist");
} else if (optionNum == 3) {
System.out.print("Your list: " + runescape);
} else if (optionNum == 4) {
System.out.print("You have exited the program.");
break;
}
}`
I am wondering why I get this error, if I try entering a String made up of multiple words. For example if I enter "Hello Peter".
Thank you for the help in advance.