public Date(String date){
  String[] fields=date.split("/");
  if (fields.length != 3) {
    throw new IllegalArgumentException("Invalid date");
  }
  month=Integer.parseInt(fields[0]);
  day=Integer.parseInt(fields[1]);
  year=Integer.parseInt(fields[2]);
  if (!isValid(month,day,year))   throw new IllegalArgumentException("Invalid date");
}

public Date ( String date ) { String [ ] fields = date . split ( "/" ) ; if ( fields . length != 3 ) { throw new IllegalArgumentException ( "Invalid date" ) ; } month = Integer . parseInt ( fields [ 0 ] ) ; day = Integer . parseInt ( fields [ 1 ] ) ; year = Integer . parseInt ( fields [ 2 ] ) ; if ( ! isValid ( month , day , year ) ) throw new IllegalArgumentException ( "Invalid date" ) ; }
initializes new date specified as a string in form mm / dd / yyyy .
