Close
jGuru Forums
Posted By: iirr_sgsr Posted On: Thursday, November 15, 2007 01:43 PM
I have a HashMap I call the get(key) method and this method returns me the Object type. A field which is Date type whose key is DATE_KEY and when i call get(DATE_KEY) it returns me the Object type but I need to convert it to Date and when i cast it, I get classcast exception. Any clue/solution pls? Line 1. xxx = xxx.get(DATE_KEY); xxx.get(DATE_KEY).getClass(),getName() says it is a Date type but when I cast it to date in line 1, it throws classcast exception.
Re: casting Object to Date
Posted By: Robert_Lybarger Posted On: Thursday, November 15, 2007 07:32 PM