Date format validation
I have a string which contion date like 02/07/2007, i need to validate the string example if user enter the date 02/a7/2007 in the text box the application should not accept the value .. any one can help me out , pls find the code , which is getting an error
"Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "a""
for(int z=0;z<=9;z++)
{
if(Integer.parseInt(stra[i+1]) == z )
{
date=stra[i-2]+stra[i-1]+stra+ stra[i+1]+stra[i+2]+stra[i+3]+stra[i+4]+stra[i+5]+stra[i+6]+stra[i+7];
System.out.println("Date is --> " +date);
}
}

