Contravariant method argument type
问题 wiki Contravariant_method_argument_type says overriding method has the subtyping rule as function type, but no language except one support contravariant argument type. I also not able to come up with any idea of benefit to use that. example: class AnimalShelter { Animal getAnimalForAdoption() { ... } void putAnimal(Animal animal) { ... } } class CatShelter extends AnimalShelter { @Overriding Cat getAnimalForAdoption() { return new Cat(); } @Overriding void putAnimal(Object animal) { … } } My