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
Coder100 (18915)

you defined your scanner class to be userInput?

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

please, read the errors lol
@Dawson313