Java: What am i doing that is preventing me using the code to check the user input against the list?
Dawson313 (0)

List:
ArrayList List = new ArrayList();
List.add("Add");
List.add("Subtract");
List.add("Multiply");
List.add("Divide");

Get User Input:
Scanner userInput = new Scanner(System.in);
System.out.println("What do you want to do?");
String user_choice = scanner.next();

Check Input Against List:
if (user_choice(List)); {
System.out.print("Working");

You are viewing a single comment. View All
Dawson313 (0)

that wasn't what i intended, i meant to set the name of it to userInput, i wanted the input to be string and to be able to reference it as userInput, i'll mess around with [email protected]