Give me the solution pls for my full understanding)
package com.codegym.task.task12.task1215;
/*
Cats should not be abstract!
*/
public class Solution {
public static void main(String[] args) {
}
public static class Pet {
public String getName();
public Pet getChild();
}
public static class Cat extends Pet {
public Cat getChild() {
return null;
}
}
public static class Dog extends Pet {
public Dog getChild() {
return null;
}
}
}