I am trying to compare an array (of strings) to a regular string from an input. Is this possible? I have my test code and it's mostly just says
incomparable types java.lang.string and java.lang.string[]
This is my test code:
String[] yes = new String[5];
yes[0] = "yes";
yes[1] = "yeah";
yes[2] = "sure";
yes[3] = "yupp";
yes[4] = "okay";
System.out.println("Input");
String input = scan.next();
if ((input).equalsIgnoreCase(yes)) {
System.out.println("compared!");
}