title: Parse String to Date with Different Format in Java
body: <p>I want to convert <code>String</code> to <code>Date</code> in different formats.</p>
  
  <p>For example, </p>
  
  <p>I am getting from user,</p>
  
  <pre><code>String fromDate = "19/05/2009"; // i.e. (dd/MM/yyyy) format
  </code></pre>
  
  <p>I want to convert this <code>fromDate</code> as a Date object of <code>"yyyy-MM-dd"</code> format</p>
  
  <p>How can I do this?</p>