title: Split a date and inserting it to a web form
body: <p>I have a Date in string format "01-23-2004".
  I want to split the date and insert every day/month/year to a different filed in a web form.</p>
  
  <p>I did this:</p>
  
  <pre><code>public static void  dateInString()  
  {
      String dt = "01-23-2004";
      String dateParts[] = dt.split("-");
      String month  = dateParts[0];
      String day  = dateParts[1];
      String year = dateParts[2];
  
  }
  
  
  public void insertBirthDateBounus() throws IOException, ParserConfigurationException, SAXException 
  {
      comOps.selectDropDown(birthdayMonth,day);
      comOps.selectDropDown(birthdayDay, mounth);
      comOps.selectDropDown(birthdayYear, year);
  
  }
  </code></pre>
  
  <p>And I received an error msg that day, mounth, year - cant be resolved by variable.</p>
  
  <p>( comOps.selectDropDown is the select from drop down list to select a date. This was written in a different class with all my common methods )</p>