title: incompatible types: String[] cannot be converted to String
body: <p>I'm being completely beaten up by types in Java.</p>
  
  <p>I have coordinates in a txt file, which ultimately I want to format into an array of these co-ordinates, with each array item being a double.</p>
  
  <p>Each line of my txt file looks like so:</p>
  
  <pre><code>13.716              , 6.576600074768066  
  </code></pre>
  
  <p>Currently, I'm trying to split this line into an array of two Strings, which I will then try and parse into doubles, but I keep getting the error in the title.  Where am I going wrong? </p>
  
  <p>Any other better approaches on converting my Arraylist of Strings to a formatted list of double coordinates would be great, like so</p>
  
  <pre><code>[[0,1], [0,2], 0,4]
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code> public static String[] getFileContents(String path) throws FileNotFoundException, IOException
      {
          InputStream in = new FileInputStream(new File(path));
          BufferedReader reader = new BufferedReader(new InputStreamReader(in));
  
          List&lt;String&gt; data = new ArrayList&lt;String&gt;();
          StringBuilder out = new StringBuilder();
          String line;
  //        Skips 1376 characters before accessing data
          reader.skip(1378);
          while ((line = reader.readLine()) != null) {            
                  data.add(line);
  //                System.out.println(line);
          }  
  
          for (int i=0; i &lt; data.size(); i++){
              data.set(i, data.get(i).split(","));
          }
  //        String[] dataArr = data.toArray(new String[data.size()]);
  //        Test that dataArr[0] is correct
  //        System.out.println(data.size()); 
  //        List&lt;String&gt; formattedData = new ArrayList&lt;String&gt;();
  //        for (int i = 0; i &lt; data.size(); i++){
  //            formattedData.add(dataArr[i].split(","));
  //        }
          reader.close(); 
          return dataArr;
      }
  </code></pre>