title: Java: how to make timestamp to display 3 digits for milliseconds all the time?
body: <p>Basically, I am trying to obtain the system current timestamp, including milliseconds too with the following method</p>
  
  <p><code>Timestamp timestamp = new Timestamp(System.currentTimeMillis());
   System.out.println(timestamp);</code></p>
  
  <p>Problem is sometimes it would be display 
  <code>2018-08-26 14:17:16.94</code></p>
  
  <p>I want it to display <code>2018-08-26 14:17:16.940</code> instead, so there is always 3 digits in the milliseconds. </p>
  
  <p>How can I do that ?</p>
  
  <p>Thank you very much.</p>