title: How to pass string arraylist into contains() method as parameter?
body: <pre><code>    public static void main(String[] args) {
          // TODO Auto-generated method stub
          System.setProperty(&quot;webdriver.chrome.driver&quot;,&quot;D:\\ChromeDriver\\chromedriver.exe&quot;);  
          WebDriver driver = new ChromeDriver();
          driver.get(&quot;https://411mania.com/wrestling/category/tv-report/&quot;);
          WebElement contents = driver.findElement(By.className(&quot;article_section_wrapper wrestling article_category_wrapper tv-report&quot;));
          List&lt;WebElement&gt; links = contents.findElements(By.tagName(&quot;a&quot;));
          String clickonlinkTab=Keys.chord(Keys.CONTROL, Keys.ENTER);
          String[] a = {&quot;TALK, WxW, NJPW, Impact&quot;,&quot;Dark&quot;,&quot;Elevation&quot;};
          for (int i = links.size() - 1; i &gt;= 0; i--) {
              if (!(links.get(i).getText().contains(a))) //Eclipse gives me error at this line.
                      {
                  links.get(i).sendKeys(clickonlinkTab);
              }
          }
  }
  </code></pre>
  <p>I am trying to iterate each links of <strong>TV reports</strong> and skip the links using string arraylist.</p>
  <pre><code>Error: Exception in thread &quot;main&quot; java.lang.Error: Unresolved compilation problem: 
  The method contains(CharSequence) in the type String is not applicable for the arguments (String[])
  
  at hetj.Gssm.main(Gssm.java:26)
  </code></pre>