Error using ArrayList in Java
<p>I was solving a problem before including it in my code and using List to get strings then work around with them. I got the error: "type List does not take parameters List  words = new ArrayList();" after compilation. I searched but the syntax i use is correct, please whats wrong with the code? </p>

<pre><code>import java.util.Scanner;
import java.util.ArrayList;

public class List{
    public static void main(String args[]){
        List&lt;String&gt; words = new ArrayList&lt;String&gt;();
        Scanner input = new Scanner(System.in);
        for (int i=0; i &lt; 3; i++)
            words.add(input.nextLine());
        System.out.println(words);
    }

}
</code></pre>
