title: Array of String to Date format conversion in Java
body: <p>I have a String in which dates are there. I want this String to be Stored in another date Array after conversion and then convert this into calendar.</p>
  
  <pre><code>st_date = (Date)formatter.parse(startDt); 
  </code></pre>
  
  <p>Currently I am using above function but this  works only for String and not for array.</p>
  
  <p>Below code is not working. Can anybody give the reason??</p>
  
  <pre><code>Date holiday[]=null;
  Calendar holidays[]=null;
  for(int i=0;i&lt;5;i++)      
     {    
       holiday[i] = formatter.parse(holid[i]);
       holidays[i] = Calendar.getInstance();       
       holidays[i].setTime(holiday[i]);
     }
  </code></pre>
  
  <p>Kindly give the solution as soon as possible.</p>