Re:Teaching the Unfortunate Parts
by ameliaquining on Tuesday December 29, 2020 @09:25AM
(#25569975)
Only arrays (the only generic type that predates Java 5) have this problem in Java, and for precisely this reason, modern Java practice avoids arrays in favor of other collection types. When real generics were introduced in Java 5, they used a design with proper variance that doesn't have this problem.
[ Parent
| on HN ]
There are no comments on this comment yet.