title: Reading .tsv file in Java
body: <p>I am a beginner and I am trying to read a .tsv data in Java and save the lines to an ArrayList. I wrote a method for it but the only thing I get is line id's and nothing more... I can't find an error. Could you please help me?</p>
  
  <pre><code>public static ArrayList&lt;String[]&gt; tsvr(File test2) throws IOException {
      BufferedReader TSVReader = new BufferedReader(new FileReader(test2));
      String line = TSVReader.readLine();
      ArrayList&lt;String[]&gt; Data = new ArrayList&lt;&gt;(); //initializing a new ArrayList out of String[]'s
      try {
          while (line != null) {
              String[] lineItems = line.split("\n"); //splitting the line and adding its items in String[]
              Data.add(lineItems); //adding the splitted line array to the ArrayList
              line = TSVReader.readLine();
          } TSVReader.close();
      } catch (Exception e) {
          System.out.println("Something went wrong");
      }
      return Data;
  }
  </code></pre>