title: How to correctly create a tab delimited text file in Java
body: <p>I am trying to create a tab delimeted text file so that the output appears like columns but for some reason the tab appears on different locations. This is caused by the fact that the data values are different sizes. </p>
  
  <p>here is how i am building the rows and columns</p>
  
  <pre><code>output.append("|\t" + column1 + "\t\t\t:\t" + column2 +"  \t\t\n");
  </code></pre>
  
  <p>And the output is coming out as </p>
  
  <pre><code>|   activeSessions      : 0         
  |   duplicates      : 0         
  |   expiredSessions         : 0         
  |   rejectedSessions        : 0         
  |   sessionMaxAliveTime         : 0         
  |   sessionCounter      : 0         
  </code></pre>
  
  <p>As you can see the values with longer text entries on the first column causes the second column to move slightly further away even though both column are separated by two tabs. How can i ensure that the second column location is on the same line?</p>
  
  <p>Thanks</p>