title: Saving current date in Date type
body: <p>I want to display current date in MM-dd-yy format </p>
  
  <pre><code>Date d1=new Date();
  </code></pre>
  
  <p>Now I want to change in to the mm-dd-yy pattern</p>
  
  <p>So I formatted it using simple date format</p>
  
  <pre><code>SimpleDateFormat simpleDateFormat = new SimpleDateFormat(MM-dd-yyyy);
  </code></pre>
  
  <p>Pattern
  Now d1 is in string type but I want it as Date type</p>