3 ms·
Just to further clarify, the existence (or not) an _explicit_ cast operator is not necessary to create an implicit cast that might fail. The dumbest case being
by olliej 10y ago
Just to further clarify, the existence (or not) an _explicit_ cast operator is not necessary to create an implicit cast that might fail. The dumbest case being due to the contra variant array semantics that say i can do this:
Object[] foo = new String[10]
foo[0] = new Integer(1)
which is the type error, even if the reported error is something akin to a "array store error" or something (it's been a long time since i did java programming :D)