✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Le code Java suivant se compile correctement...
class Animal { }class Lion extends Animal { }class Gazelle extends Animal { }class TestCage { public static void main(String[] args) { Lion leRoi = new Lion(); Gazelle gazL = new Gazelle(); ArrayList<Lion> cageDuLion = new ArrayList<>(); cageDuLion.add(leRoi); ArrayList<? extends Animal> autreCage = cageDuLion; }}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!