Ok,

So what i want to do is read in a String from the user and test to see if the inputted String is equal to one of the Strings that exist in a String array that i have created.

Here is what i have:

public class task13 {
 
    public static void main(String[] args) {
 
        String[] passwords = new String[]{"rose77", "2today", "5staff"};
 
        Scanner scan = new Scanner(System.in);
 
        System.out.println("Enter a valid company password: ");
 
        String input = scan.nextLine();
 
       [B] if (input is equal to one of the Strings in the String Array)
 
                  then execute this
 
         else ...........................[/B]
    }
}


I have highlighted the bold part which is where i am stuck im not sure which class or method i need to use.