Tag: covariance in java
-
Covariance and Contravariance (Java)
Many programming languages support subtyping, for example, MechanicalKeyboard can be a subtype of Keyboard, and according to the Liskov substitution principle, the MechanicalKeyboard instance should be substitutable everywhere the Keyboard […]