calendar api to set many dates
<pre><code>    import java.util.Calendar;
    import java.util.Date;
    public class Employee {
        private Calendar doj; 
        public Employee(Calendar date) {
            // TODO Auto-generated constructor stub
            this.doj=date;
        }
        public Date getDoj() 
        { 
            Date cal=Calendar.getInstance().getTime();
            return cal; 
        } 

    }

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;


public class TestEmployeeSort {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        List&lt;Employee&gt; coll = getEmployees();
        printList(coll);
    }
        public static List&lt;Employee&gt; getEmployees() 
        { 
            List&lt;Employee&gt; col = new ArrayList&lt;Employee&gt;();
            //SimpleDateFormat format=new SimpleDateFormat("DD/MM/YYY");
            col.add(new Employee(null));
            return col;
        } 
        private static void printList(List&lt;Employee&gt; list) { 
            System.out.println("Date Of Joining"); 

            for (int i = 0; i &lt; list.size(); i++) { 
                Employee e = list.get(i); 
                System.out.println(e.getDoj()); 
            } 
        } 
    }
</code></pre>

<p>This prints the current date. But i want to set the date like the following where i have used date. But i want to do the same using calendar api</p>

<pre><code>public static List&lt;Employee&gt; getEmployees()
        { 
            List&lt;Employee&gt; col = new ArrayList&lt;Employee&gt;(); 
            col.add(new Employee(5, "xyz","abc", new Date(1986, 6,12), new Date(1986, 6,12)));
                    return col;
        }
</code></pre>
