List<String> songList = new ArrayList<>(); songList.add("Some song"); //Repeat until satisfied System.out.println("\n\tWelcome! Please choose a song!"); String songChoice = scan.nextLine(); while (!songList.contains(songChoice)) { //Do stuff when input is not a recognised song }