Error: Unhandled exception type parse exception
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");Date FirstCustomerDateOfBirth = sdf.parse("1980-01-15"); //FIXMEFirstCustomer.setDateOfBirth(FirstCustomerDateOfBirth);Any ideas pls?
[219 byte] By [
J0na] at [2007-11-27 7:50:09]

I tried enclosing it within a try.catch block and the error vanished. However another error is being displayed:
FirstCustomerDateOfBirth cannot be resolved
Any ideas pls?
Code:
try {
Date FirstCustomerDateOfBirth = sdf.parse("1980-01-15");
}
catch (ParseException e)
{
e.printStackTrace();
}
FirstCustomer.setDateOfBirth(FirstCustomerDateOfBirth);
J0na at 2007-7-12 19:31:10 >

Because you declare that variable inside the try block, so its scope is only the try block.Either declare the variable outside the try block, or move the print statement inside.
jverda at 2007-7-12 19:31:10 >
