LinkedList from .txt file (how to read everything but the first value of each line)
<p>My ultimate goal is to create a linked list that compares the number of friends a person has (i.e. in the list below Joe has 4 friends while Kay has 3 (Joe is the most popular). The data for the list is imported from a text file. My question now is how can I read everything but the first string value from the text file? </p>

<p>Right now the text file has the following string data: </p>

<pre>Joe Sue Meg Ry Luke
Kay Trey Phil George</pre>

<pre><code>import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;

import java.util.*;

public class Main    {
    public static void main(String[] args) {

        List&lt;String[]&gt; list1 = new LinkedList&lt;String[]&gt;();

        // Read the file
        try {
            BufferedReader in = new BufferedReader(new FileReader("C:\\friendsFile"));
            String names;

            // Keep reading while there is still more data
            while ((names = in.readLine()) != null) {

                // Line by line read &amp; add to array
                String arr[] = names.split(" ");
                String first = arr[0];
                System.out.print("\nFirst name: " + first);    

                if (arr.length &gt; 0)
                    list1.add(arr);

            }

            in.close();
            // Catch exceptions
        } catch (FileNotFoundException e) {
            System.out.println("We're sorry, we are unable to find that file: \n" + e.getMessage());
        } catch (IOException e) {
            System.out.println("We're sorry, we are unable to read that file: \n" + e.getMessage());
        }       
    }
}
</code></pre>
