If Arrays is said to know type information only at run time, I should literally be able to assign any values to any arrays, since typing is known only at run time errors that will be thrown only at run time. But this is not so in real time. For this, we get a compile-time error.
Reifiable types know their type at runtime and compile time, so the compiler will still prevent you from making silly errors wherever possible (what does it mean to skip them?)
However, sometimes when the compiler cannot always decide whether an assignment (for example) will be valid because it does not know the exact types, and this can check the reified types. For instance:
Object[] arr = new String[5]; arr[0] = 7;
... this compiles because in the second line the compiler knows only the static type of the array as Object , while the dynamic type is something more specific. In Runtime, it will crash as an exception, which can only be because (unlike the general collection classes) a certain type is known at runtime.
source share