import java.util.ArrayList;
import java.util.List;

class Animal{}
class Dog extends Animal{}
class Cat extends Animal{}

class Adapter {
    public void setData(List<? extends Animal> animals){
    }
}

public class Temp{
    public static void main(String[] args) {

        List<Cat> cats = new ArrayList<>();
        cats.add(new Cat());
        cats.add(new Cat());

        Adapter adapter = new Adapter();
        adapter.setData(cats);


    }
}
@@ -49,23 +49,8 @@
 t;%0A%0A
-class Animal%7B%7D%0A
 clas
@@ -98,16 +98,45 @@
 Animal%7B%7D
+%0Aclass AdPet extends Animal%7B%7D
 %0A%0Aclass 
@@ -202,16 +202,66 @@
 imals)%7B%0A
+        animals.add(new AdPet());%0A        // ....%0A
     %7D%0A%7D%0A
@@ -503,15 +503,175 @@
 ats);%0A%0A%0A
+        List%3C? extends Animal%3E animals = new ArrayList%3C%3E();%0A        animals.add(new Dog());%0A        animals.add(new Cat());%0A        Animal a = animals.get(0);%0A%0A
     %7D%0A%7D

fix the previous error