title: Java Format Lines So Columns Line Up
body: <p>I am trying to format a line of data in Java so each column lines up. I am using tabs currently, but it does not seem to be working.</p>
  
  <p>This is what I am trying :</p>
  
  <pre><code>System.out.printf("Town\tDate\tWind Speed\tDirection\tTemp(F)\tTemp(C)\tWind Chill(C)\tReporter\n");
  
  System.out.printf(town + "\t" + date + "\t" + windSpeed + "\t" + direction + "\t" + 
                              getFahrenheit(tempC) + "\t" + tempC + "\t" + getWindChillFactor(windSpeed, tempC) + "\t" +
                              reporterCode + "\n");
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/VhNQL.png" alt="enter image description here"></p>