variância
Why are arrays Covariant and generic are invariant?
Arrays in Java are covariants, that is, it is perfectly cool to do something like:
Number[] meuArray = new Integer[10];
A ... id you decide to implement Covariant arrays?
Original question: SOen-Why are arrays covariant but generics are invariant?
What are covariance and contravariance?
I saw something like in this question and I know that this somehow relates to object orientation.
What are they? How do they affect my code, and how can I use them to code better?