soldierdackel
Programmer
Hi people,
I'm new to Java and therefore seek "professional" help. Try to take a look at below code:
DocumentAbbrMap d;
for (int i=0; i < arrayList.size(); i++) {
d = (DocumentAbbrMap) arrayList.get(i);
}
For some strange reason I get a ClassCastException when I do the above. I tried using Vector with the same result.
I also made sure that the ArrayList was actually populated with instances of type DocumentAbbrMap.
I don't get the exception if I add Objects to the ArrayList.
Please, anyone?
I'm new to Java and therefore seek "professional" help. Try to take a look at below code:
DocumentAbbrMap d;
for (int i=0; i < arrayList.size(); i++) {
d = (DocumentAbbrMap) arrayList.get(i);
}
For some strange reason I get a ClassCastException when I do the above. I tried using Vector with the same result.
I also made sure that the ArrayList was actually populated with instances of type DocumentAbbrMap.
I don't get the exception if I add Objects to the ArrayList.
Please, anyone?