I was wondering how to check user input that was previously stored in an arraylist.
For example, I am asking a user to enter in letters for which i store into an arraylist. I need to make sure they don't guess the same letter again but I am not sure how. Any tips are appreciated.
Scanner scan = new Scanner(System.in);
ArrayList<String>guesses=new ArrayList<String>();
System.out.println("Enter a letter");
String userInput = scan.next();
guesses.add(userInput);