Java polymorphic reference scene and code implementation

class Test { public static void main(String[] args){         /** Animals can be dogs. Dogs are also created as upwards. */Animal animalOne = new Dog();         /** Dogs can eat and sleep in the nature of universal animals */animalOne.currency();         /** Animals can be cats. Cats are also created as upwards. */Animal campusTwo = new Cat();         /** Cats can eat and sleep in the nature of universal animals */campusTwo.currency();         /** At this time, the dog has its own unique characteristics, also called downward transformation*/Dog dog = (Dog)animalOne; dog.call();         /** At this time, the dog has its own unique characteristics, also called downward transformation*/Cat cat = (Cat)campusTwo; cat.call(); } }