Covariance and contravariance (computer science): Difference between revisions

Content deleted Content added
m rv grammar regressions
Line 70:
Object[] b = a;
 
// Assign an Integer (int) to b. This would be possible if b really were actually
// an array of Object, but since it really is an array of String,
// we will get a java.lang.ArrayStoreException at runtime.
b[0] = 1;
</syntaxhighlight>