12-15-2008 02:11 AM
When the code below is executed, a ClassCastException will be thrown.
ContactList _contactList = (ContactList)PIM.getInstance().openPIMList(PIM.CON
Vector _contactVector = enumToVector(_contactList.items());
//enumToVector is a function to transform enum to vector
BlackBerryContact contact = (BlackBerryContact)(_contactVector.elementAt(index
//the exception thrown by this sentence
I use almost the same code at some other place,it works well there.But why there is an exception here? Any suggestion will be appreciated.
Solved! Go to Solution.