title: How do I convert the date from one format to another date object in another format without using any deprecated classes?
body: <p>I'd like to convert a date in date1 format to a date object in date2 format.</p>
  
  <pre><code>    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMMM dd, yyyy");
      SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMdd");
      Calendar cal = Calendar.getInstance();
      cal.set(2012, 8, 21);
      Date date = cal.getTime();
      Date date1 = simpleDateFormat.parse(date);
      Date date2 = simpleDateFormat.parse(date1);
      println date1
      println date2
  </code></pre>