title: Fill Array With incremented Date value in Android
body: <p>//Well i have gone through so many tutorial but coudlnt find my thing so i am here to put  up my query
  i have two <code>DatePicker</code> <code>FromDate</code> and <code>ToDate</code> 
  What i want is when User selext the date it should come in a <code>String Array</code> of Dates
  suppose my date is <code>Start_Date="1/09/2012"</code> i want to fill Array like </p>
  
  <pre><code>String[] Date Arrau= {"1/09/2012","2/09/2012","3/09/2012","4/09/2012"} 
  </code></pre>
  
  <p>What i have done is </p>
  
  <pre><code>    DateDifference=Integer.parseInt(EndDate)-Integer.parseInt(StartDate);
  
  SimpleDateFormat sdf= new SimpleDateFormat("dd-MM-yyyy");
  
      Date myDate= null;
      try {
          myDate= sdf.parse(StartDate);
      } catch (ParseException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      Date newFirstDate= new Date(myDate.getDate()); // 7 * 24 * 60 * 60 * 1000
  
      for(int i=0;i&lt;=DateDifference;i++){
          Calendar c= Calendar.getInstance();
          c.setTime(newFirstDate);
          c.add(Calendar.DATE, 1);
          Date newDate= c.getTime();  
          DateArray[i]=newDate.toString();
  
      }
  </code></pre>
  
  <p>i am getting a null pointer Exception Error</p>
  
  <p>it is giving me error Please help !!</p>