title: Get Date type object in format in java
body: <p>As we know we can get date using  <code>Java.util.Date</code> or <code>Calender</code> instance or by using <code>GregorianCalendar</code> instance . </p>
  
  <p>Using class '<code>SimpleDateFormat</code>' we can <code>parse()</code> or <code>format()</code> function  our <code>Date</code> or <code>String</code>. </p>
  
  <p>As we know using <code>parse()</code> or <code>format()</code> function we get output as a <code>String</code> only.</p>
  
  <p>Is there any option available in java to get <code>Date</code> instance in particular format like 'yyyy-MM-dd' or any other format, but final output should be of <code>Date</code> type with this format ?</p>