Test test = new Test(); test = new Test();
class Animal {} class Dog extends Animal {} class Cat extends Animal {} public class Test { // using Dog object Animal obj = new Dog(); // using Cat object obj = new Cat(); }
0