title: Java Format Long
body: <p>I have Hours, Minutes and Seconds stored in long variables. Pretend that the current values of these are:</p>
  
  <pre><code>long seconds = 30;
  long minutes = 0
  long hours = 0;
  </code></pre>
  
  <p>When I convert these to strings and print them:</p>
  
  <pre><code>Long.toString(Hours)+":"+Long.toString(Minutes)+":"+Long.toString(Seconds)
  </code></pre>
  
  <p>The output looks like</p>
  
  <p>0:0:30</p>
  
  <p>I want:</p>
  
  <p>00:00:30</p>
  
  <p>I'm assuming this should be straight forward but I cant work it out..</p>