[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incomprehensible bit of code...



hello,

again, I have an bit of code which is not understanble...

this works:

Object[] objects = factsMap.get(factType);
PersistentFact[] facts = new PersistentFact[objects.length];
for (int i=0; i<facts.length; i++)
{
	facts[i] = (PersistentFact)objects[i];
	}
return facts;

whereas this is not working:

return (PersistentFact[])objects;

even if it should be sytactically equivalent,

please correct me,

Stan.