title: Selenium webdriver : List is not generic; it cannot be parameterized with arguments `<WebElement>` type
body: <p>I was trying to store link in List, follow below code</p>
  
  <pre><code>public class frameswitch {
  
  public static void main(String[] args) {
  
      System.setProperty("webdriver.gecko.driver","C:\\geckodriver\\geckodriver.exe");  
      WebDriver driver=new FirefoxDriver();
      String baseUrl="https://www.udacity.com/";
      driver.get(baseUrl);
      String Title="Udacity - Free Online Courses and Nanodegree Programs";
      List&lt;WebElement&gt; linkElements = driver.findElements(By.tagName("a"));
      }
  }
  </code></pre>
  
  <p>but facing error while using list </p>
  
  <blockquote>
    <p>The type List is not generic; it cannot be parameterized with arguments <code>&lt;WebElement&gt;</code> type</p>
  </blockquote>