posted 15 years ago
Hi,
Welcome to JavaRanch!
Yes, it's possible, but only if the object actually is an int[]. In other words, this is legal:
Object o = new int[5];
int[] ia = (int[]) o;
When casting object references, the cast never makes any change to the object itself; it's only an instruction to the compiler to treat the object as a different type. If the object is not actually of the correct type, you'll get a ClassCastException at runtime.