title: How to correctly create a date with a specific format?
body: <p>I have the following doubt related how to create a format date in Java.</p>
  
  <p>In a Java application I have to create a date (the value have to be the current date) formatted in this way: <strong>2015-05-26</strong> (<strong>yyyy-mm-dd</strong>)</p>
  
  <p>So I know that I can obtain the current date simply build a new <code>java.util.Date</code> object, this way:</p>
  
  <pre><code>Date dataDocumento = new Date();
  </code></pre>
  
  <p>but how can I specify my date format?</p>
  
  <p>Tnx</p>