title: Reading a tab-separated file in Java
body: <p>I have the following piece of code to read a tab-separated file in Java:</p>
  
  <pre><code>while ((str = in.readLine()) != null) {
    if (str.trim().length() == 0) {
            continue;
    }
  
    String[] values = str.split("\\t");
  
    System.out.println("Printing file content:");
    System.out.println("First field" + values[0] + "Next field" +  values[1]);
  }
  </code></pre>
  
  <p>But it's printing 1 instead of the file content. What is wrong here?
  A line from the sample file reads as follow:</p>
  
  <pre><code>{Amy Grant}{/m/0n8vzn2}{...}
  </code></pre>