title: Displaying seconds in 3 decimal places. - java
body: <p>I am using milliseconds in my java program and converting it to seconds. After my method does this, it returns seconds in a long format.</p>
  
  <pre><code>System.out.println("[" + threadID + "]" + " " + "SeqSum res=" + grandTotal + " secs=" + stopTime);
  </code></pre>
  
  <p>I have used the variable stopTime to display the seconds.</p>
  
  <p>My output is currently secs=0
  It needs to be secs=0.000</p>
  
  <p>I need it to be displayed to 3 decimal places using system.out.println() or system.out.format()</p>
  
  <p>How can I reword my print statement so that I get the output secs=0.000?</p>
  
  <p>Please help</p>