List in java using Random numbers
<p>I am getting the following error.</p>

<pre><code>import java.util.*;
import java.io.*;

public class ShufflingListAndArray
{
  public static void main(String[] args) throws IOException

{
    List services = 


    //Arrays.asList("COMPUTER", "DATA", "PRINTER");

 Arrays.asList(new String[] {"COMPUTER", "DATA", "PRINTER"}); 

   Random rnd=new Random();
  String s = services.get(rnd.nextInt(services.size()));

    Collections.shuffle(services);


    //Collections.sort(list);


    System.out.println("List sorting :"+ services);
  }
} 
</code></pre>

<p>After compiling the above code I get the following error.</p>

<pre><code>C:\&gt;javac ShufflingListAndArray.java
ShufflingListAndArray.java:17: incompatible types
found   : java.lang.Object
required: java.lang.String
  String s = services.get(rnd.nextInt(services.size()));
                         ^
1 error
</code></pre>
