public static Set<Object> join(Set<Cat> cats, Set<Dog> dogs) {
        //напишите тут ваш код

        HashSet<Object> pets = new HashSet<>();
 pets.addAll(cats);       // proxodit
 pets.addAll(dogs);
//      Collections.addAll(pets, cats );    ne proxodit.
//      Collections.addAll(pets, dogs);

        return pets;
gdeto Pochital chto Collections.addAll bistree , a tut ne proxodit .