cannot figure out how node works in my code
<p>I'm a java beginner, and i'm trying to make a code which can created a linked loop of names in random order,so this is the code i got so far.    </p>

<p>and i think the problem is in <code>assassinGame class</code>, but i think it should return node, so that i can use in the second class. but i dont really know how to put this name into the node.
   ** and for the second class which asks me to print the last one for each two names, which means, if the list is 1,2,3,4,5.  so it should print out 2,3,4,5, that what i thought.</p>

<p>** the first class is a constructor, none of them are main method.</p>

<pre><code>private Node start;       

private static class Node {
    public int val; 
    public Node next;

    public Node(int v, Node n) {
            val = v;
            next = n;
    }
}

public AssassinGame(String[] names) {
    Random name = new Random();
    int num = name.nextInt(10)+1;

    String[] peoples = {"Bob","Jill","Tom","Brandon","Stontaigh",
                        "Loofautt","Grennoogh","Jshjnt","Zjlouv",
                        "Fabeih","Aishof","Hoir"};
    List&lt;String&gt; nam = Arrays.asList(peoples);
    Collections.shuffle(nam);
    int index = new Random().nextInt(nam.size());
    String anynames = nam.get(index);
    System.out.println("Your random name is" + anynames + "now!");
    return nam;
}

public void print() {
    while(nam.next!=null) { System.out.println(nam.next); }
}
</code></pre>
