title: Compilation error when instantiating a new ArrayList
body: <p>I have the following code:</p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  import java.util.*;
  import java.io.*;
  
  public class ShufflingListAndArray
  {
     public static void main(String[] args) throws IOException
     {
     List &lt;String&gt; services = new ArrayList&lt;String&gt; (
     Arrays.asList("COMPUTER", "DATA", "PRINTER"));//here I have used List &lt;String&gt; services=new ArrayList&lt;String&gt;( Arrays.asList("COMPUTER", "DATA", "PRINTER"));// followed by next statement Satring s=Services.get(rnd.nextInt(Services.size()));
  
     String s = services.get(rnd.nextInt(services.size()));
  
     Collections.shuffle(list);
     //Collections.sort(list);
     System.out.println("List sorting :"+ list);
     }
  } 
  </code></pre>
  
  <p>And when I compile this program I get the following error:</p>
  
  <pre><code>C:\&gt;javac ShufflingListAndArray.java
  ShufflingListAndArray.java:6: '(' or '[' expected
      List&lt;String&gt; services = new ArrayList&lt;String&gt;(
                                           ^
  1 error
  </code></pre>
  
  <p>Can someone help me resolve this error?</p>